> > thoughts? votes? bad idea?
>
> Difficult.
>
> 1) What is a singleton? Is it one instance per classloader, one per JVM or
> one per a cluster of machines?

once per classloader. If you want to go beyond that you need another
mechanism (it's just not possible within Java otherwise, as you need
"static").

> 2) This is similar to the root component manager issue (Berin
> brought up the
> fact that there are some security risks involved and that JNDI would be
> safer), and I think a solution within that framework would be better. It
> would also answer the first question.

JNDI should be optional, methinks. So a JNDI-stored single-instance-only-
objects-framework should be only ever an optional part.

If you store a singleton within JNDI to make it a singleton, you're making
sure the object only exists on a single computer and are obtaining remote
references to that object. Sounds like you could also use RMI to export the
object. Or SOAP. Or JMX. Or (de-)serialization to a central location.
When you consider that, you still need a marker interface indicating some
component should be a system-wide singleton and that the CM should get it
from some configured remote source. And a management abstraction from all
those tools. And more configuration.
Probably better to start with the std per-CL-singleton option...

...just thoughts.

- Leo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to