"Kenneth D. Litwak" wrote:
>
>    Although it is possible to have instance variables in a stateless session
> bean, myimpression is that you should assume their value will be wiped out when
> the current method running exits.  That is, once a bean goes back into the pool
> (provided the server pools stateless session beans, which I don't think is a
> requriement), any instance data is history.  Is that correct? Thanks.
>
The EJB spec provides for the retention of state in the instance variables. EJB 1.1 states:

"The term 'stateless' signifies that an instance has no state for a specific client. However the instance variables of the instance can contain the state across client-invoked method calls. Examples of such states include open open database connection and an object reference to an EJB object" (Section 6.8, Stateless Session Beans)."

HTH,

Eddie

Reply via email to