Hi All,
I have created a simple Stateless Session Bean with the following Bean
implementation:
public class HiBean implements SessionBean {
public int varToTest = 0;
public void setVar (int inp) {
this.varToTest = inp;
}
public int getVar () {
return this.varToTest;
}
/* ... and all the methods from SessionBean interface ... */
}
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? Can it be dangerous regarding a user is
beeing able to see another user´s data? I thought that Stateless Session
Bean doesn´t kept its variables when are sent to the free pool.
Thank you
Leonardo
Leonardo Momo Pedrosa
Amdocs - Web Team Brazil
*55-11-30408943 (Work)
*55-11-97930810 (Cellular)
> * [EMAIL PROTECTED]
:-)
===========================================================================
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".