The EJB spec forbids an enterprise Bean to use read/write static fields. This
restriction is part of the contract with the EJB Container to control the bean
lifecycle, e.g. by transparently distributing bean instances across multiple JVMs. I
understand GemStone was big on spawning JVMs.
The standard EJB singleton technique is to bind the singleton instance to a known JNDI
location and access it via JNDI lookup. A JNDI singleton is safe because it is unique
in the namespace and the jndi hook prevents garbage collection.
Frank Marx wrote:
> I wonder if it is possible to have a static field in the session bean and
> check if this field is set in the ejbCreate()
--
Fred Loney
Enterprise Java Consultant
Spirited Software, Inc.
[EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user