Mark Spritzler wrote:
Peter that was very poetic. You should write more books.
The muse suddenly came to me, and I thought I could extend Peter's poetry a little
(inspired by Shakespeare, Peter, and the article "When is a Singleton Not a Singleton?" at
http://developer.java.sun.com/developer/technicalArticles/Programming/singletons/#resources): The Singleton, -- to use or not to use?
The grace of pattern overwhelms me, --
You've been the subject of abuse,
Or so the ranch sheriffs try to tell me
The heat of virtual hot spot machine
Make all my initializers lazy
But class loaders are really mean, --
They make two instances, amazing!
And then the garbage man comes in
To claim the memory unreferenced
And when I call it from the bean
It's doubleton, as if I had no preferance!
The call to get an instance comes along,
But quickly gets preemted by someone to blame.
I now have a tripleton, and I am prone
To crashes, errors, tears, and paine.
Eugene Kononov.