Well, actually: 1) no and 2) no.

Simple reason: An EJB can not have static
data-members.

There are so many issues regarding this that I can not
name them all. Transactions, security, thread-safety
etc. etc. etc.

 --- Victor Langelo <[EMAIL PROTECTED]>
skrev: > "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".
>


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/

===========================================================================
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".

Reply via email to