> on 3/24/00 4:27 PM, Kevin A. Burton <[EMAIL PROTECTED]> wrote:
>
> > Basically singletons don't work.
>
> You have got to be kidding me. Singletons are fundamental to the JVM! This
> means that even simple JDK stuff like Calendar.getInstance() doesn't even
> work properly!
>
> -jon

I've got a hard time believing this as well.  In very early 1.1 VMs
singleton unloading was a problem but has since been solved.  This *might*
be a problem with VMs on Linux.  Have you tested on non-Linux VMs?

There was a JDC Tech Tips re: how to get around this for early VMs (I'll see
if I can find it).  But basically the solution, like you mentioned, was to
keep a reference to the singleton in a main() somewhere.

Also, in a previous post Kevin wrote:

> Yeah.  But as long as it is only a 10 -> 15% performance problem.  After
> that is pays to change the design (IE the singleton design.. not too OO
> but designed well).

The singleton is one the most fundamental OO design patterns.  Most of the
books on design patterns talk about this pattern, including the Gang of Four
book.



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to