It doesnt matter which app server you are using. You can store state in
SLSB and access it. But as mentioned in other post , since the request can
be served by any instance in the pool, you have to check if your
state(variable) is initialized or not . So for this you to do something
like this  in your fn(ejbCreate etc)

if(var not initialized)
{
     //initialize here
}


Cheers
Ashwani







                    Vikram Naik
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]
                    AIL.COM>                 cc:     (bcc: ashwani.kalra/Polaris)
                    Sent by: A               Subject:     Query for SLSB.
                    mailing list for
                    Enterprise
                    JavaBeans
                    development
                    <[EMAIL PROTECTED]
                    A.SUN.COM>


                    06/12/2003 06:06
                    PM
                    Please respond to
                    Vikram Naik







Hello All,

    I wanted to clear out one query regarding SLSB, and there is not better
place than this list to do so ...

1) Suppose I  have a SessionBean containing an instance member say some
string, which is initialized in the ejbCreate method.
2) The SessionBean is deployed as a Stateless Type .
3) Now i use the string value stored in instance member in one of the
business methods.
4) The string value is not mutated, but just used as constant which has to
be initiated in ejbCreate.
5) Everything goes fine .


The issue is the behaviour of the Bean ... I have deployed it as a
stateless
bean than why am i able to use the string value stored
in the instance field ... Am i not storing the state by doing so ...

I am using JBoss 3.2.1 as my ejb container.

Please comment.

Regards,
Vikram Naik

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






This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

Reply via email to