ejb@glassfish.java.net

Re: : stateful EJB

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Thu, 14 Jan 2010 12:26:07 +1100

Ah, I (mis?)read it as "the same instance EACH time".
If so:

>> i get the same instance time ?

No, a new EJB instance will be instantiated to serve your request.

>> Are every new session make a new instance of stateful ejb ?

Yes. Stateless EJB instances are pooled (i.e. reused), but stateful
instances are not.

Regards,
Dies


On 14/01/2010 12:15, Marina Vatkina wrote:
> What is the instance time that you are looking at?
>
> thanks,
> -marina
>
> נחום מורדוכוביץ wrote:
>> *
>> *
>> *hi,
>> *
>> *I started recently to study EJB,*
>> I wrote a small program, a stateful ejb with two business methods,
>> getX() and increaseX()
>> my question is whay when i call the ejb from more then one session
>> (Different browsers)
>> i get the same instance time ?
>> Are every new session make a new instance of stateful ejb ?
>>
>> thank you
>> nahummor
>>