This is where you have to be careful.
in ejbCreate() set all variables that you want to clean to null.
Otherwise if you access a variable that was set by another bean, you may get
the value that they set... as the container
could reuse this instance.
Dion
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peach, Joel
> Sent: Friday, April 06, 2001 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: "problem with session bean"
>
>
> Pranav,
>
> You are correct. Stateless session beans (SLSB) do not maintain state
> between method calls, per all versions of the EJB spec.
>
> -Joel
>
> -----Original Message-----
> From: pranav shah [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: "problem with session bean"
>
>
> Thank you Dion
> if you will answer following of confusion then i will really apprceiate
> if i have a statelerss session bean and if i am setting the value of
> variable(say "name") by calling the method (say "setvalue").now
> when i will
> again call another method(say "getvalue") on the same bean object then the
> value of our variable "name" will be unknown.am i true ?
>
> thank you
> pranav
>
>
>
> ------------- Original Message --------------
> Dion Almaer <[EMAIL PROTECTED]> wrote:
> To:[EMAIL PROTECTED]
> From:Dion Almaer <[EMAIL PROTECTED]>
> Date:Fri, 6 Apr 2001 09:10:18 -0600
> Subject:Re: "problem with session bean"
>
> Why is the stateless returning the same name? Think about what is
> happening.
>
> Client A asks for a NameBean, so WLS puts one in the container
> and sets and
> gets a name
>
> Client A then again dos a get and a set.
>
> These 4 methods COULD go to different instances, but the point of
> Stateless
> session beans
> is that the container can share instances, so throughout this process WLS
> could share
> the same object.
>
> Try a multithreaded client that calls many many methods at the
> same time and
> you will see different behaviour.
>
> So, you think you are seeing the same behaviour as w/ Stateful, but it is
> just a sideeffect of your limited test.
>
> Dion
>
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of pranav shah
> > Sent: Friday, April 06, 2001 8:41 AM
> > To: [EMAIL PROTECTED]
> > Subject: "problem with session bean"
> >
> >
> > hi all
> > i am new to EJb. i am working on weblogic server6.0 which
> > supports EJB 2.0.i was socked when i saw the same behaviour of
> > stateless and stateful session bean.
> >
> > The description of my program is as below
> >
> > in my remote interface there are 2 methods
> > 1>void setmyname(String)
> > 2>String getmyname()
> >
> > i am setting the name variable using setmyname method and
> > obtaining it from getmyname() method.
> >
> > if my bean is stateful session bean then the program works as
> > expected and return value of getmyname() method is the variable
> > which is set by setmyname() method.
> > but if the bean is stateless then also it returns the same value
> > as stateful bean(i think this should not be done.i may be wrong!)
> >
> > what is the wrong with progrsm ?does my interpretation wrong
> > ?does there any special setting to be do in deployment descriptor ?
> >
> > Thank you
> > pranav shah
> >
> >
> >
> >
> >
> >
> >
> > _____________________________________________________
> > Chat with your friends as soon as they come online. Get Rediff Bol at
> > http://bol.rediff.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".
> >
>
> ==================================================================
> =========
> 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".
>
>
> _____________________________________________________
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.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".
>
> ==================================================================
> =========
> 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".