Re: Static Variables in Session Beans

Joe Sam Shirah <[email protected]>
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <004501c3cfe1$3be80b00$bf19410c@savaj001>
    In addition to shailesh sinha's comments:

    From the EJB 2.0 spec, section 7.8

    "The term "stateless" signifies that an instance has no state for a
specific client. However, the instance variables of the instance can contain
the state across client-invoked method calls. Examples of such states
include an open database connection and an object reference to an EJB
object."


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO         -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?             http://www.jguru.com/faq/Java400


----- Original Message -----
From: "K. Charan Kumar" <[email protected]>
To: <[email protected]>
Sent: Wednesday, December 31, 2003 1:07 AM
Subject: Re: Static Variables in Session Beans


> Shailesh,
>
> If you start using static variables in Stateless session beans, meaning to
> stateless session beans is lost...  May be u can use in Stateful session
> beans...This is what I feel.
>
> -Cheers
> K.Charan Kumar
> ----- Original Message -----
> From: "shailesh sinha" <[email protected]>
> To: <[email protected]>
> Sent: Wednesday, December 31, 2003 11:32 AM
> Subject: Re: Static Variables in Session Beans
>
>
> > Yes staic variable should be used in the Stateless
> > session beans. EJB specs has only one limitation on
> > the static variables that is it should be read only,
> > by using final you are making it sure, So there is no
> > any problem in that.
> >
> >  --- sanjeev kasarabada <[email protected]> wrote: >
> > Can static final variables be used in Stateless
> > > Sesion
> > > Beans?? Is there any EJB limitation on that? Your
> > > thoughts on this are appreciated.
> > > Thanx,
> > > Sanjeev

===========================================================================
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".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.