So I have been noticing so very wierd behavior in
Cocoon/Jetspeed/Turbine under JDK 1.1 (Specifically the Blackdown JDK
1.1.8 and the IBM JDK 1.1.8, both on Linux).

Basically singletons don't work.  Both VMs will GC static members right
after there are no references.  For Servlet code that can happen very
quickly.  With finalize methods you can clearly see this happening.  

Everythign works just fine with the Singleton.   But when the you access
the Singleton again it is re-instantiated for you by the VM.  Totally
getting rid of the advantage of a singleton.

>From everything I have ever read it isn't supposed to work this way.  It
is a static method and is supposed to be global to a specific name of a
class and not an instantiation.

There is a kind of a kludge work around.  You put your instance member
within the System properties via:

System.getProperties().put()

The only problem is that java.util.Properties throws a
ClassCastException when you try to enumerate all your props (stupid
SUN!).

Therefore I don't want to do this.

Ug.  

-- 
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN:  "Please Open Source Java!"
"For evil to win is for good men to do nothing."


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

Reply via email to