Beware that the use of static data members won't work well if you want a
singleton behaviour in a clustered environment with several JVMs - then your
references will only be "global" for a particular JVM. (See previous posts on
Singletons, there has been quite a lot of them...)
/Jonas
On Fri, 7 Jul 2000, Victor Langelo wrote:
> "More, Yogesh" wrote:
>
> > Fundamental questions..
> >
> > 1. Can I have global objects which created by a session bean stay in memory
> > even after the bean ceases to exist....for other beans to share.
>
> Yes. You use static data members to hold references to these objects. Be careful
> that the garbage collector doesn't clear you class. Or at least be prepared for
> when it happens.
>
> >
> >
> > 2. Can I have singleton classes in a Container environment shared by all
> > EJBs?
>
> Yes. You can create a singleton class with only static members. Same warning
> about the GC as above.
>
> >
> >
> > Thanks,
> > Yogesh
> >
> > ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff EJB-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".