JBoss Community

Re: EJB3 annotation question ...

created by Wolfgang Knauf in EJB3 - View the full discussion

Hi,

 

as you wrote, "Home interfaces" are gone in EJB 3.x.

Bean instances are created whenever needed: if using an "@EJB" annotation, the server will create a new bean (or take an unused instance from the pool). If you inject a stateful session bean, the server will also take care to restore the state from some previous session.

 

And if you perform a JNDI lookup, you will also get a fresh instance of the bean. I think that each lookup of a stateful bean will kill its state - so if you need a stateful bean, store it in some membervariable on the client side after the initial lookup.

 

Hope this helps

 

Wolfgang

Reply to this message by going to Community

Start a new discussion in EJB3 at Community