I think the best way to learn this stuff is if you get a good book on EJBs.
I recommend Monson-Haefel's Enterprise EJBs.

Gene

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of pranav shah
Sent: Friday, April 06, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: Re: &quotproblem 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".

Reply via email to