> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Leonardo Momo Pedrosa
> It´s all working well, but I have a doubt about this ejb´s behavior:
> When I create the bean for the first time on the client, the getVar() method
> returns 0 as I expect. If I use the method setVar (15) it´s supposed that
> the varToTest receives the value 15. And it is what is happening. If I run
> another client that executes de getVar() method, we get the value 15 set by
> the first client. The container sends the bean back to the free pool with
> its state so a new client can see ?
> This behavior is right? Is it good?
You're just being lucky. The server maintains a pool of instances, of which only
one has the values you set, and that's the instance your second client was
associated to.
You should use a stateful session bean.
--
Cedric
===========================================================================
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".