[jboss-user] [EJB3] - Re: EJB3 annotation question ...
Wolfgang Knauf
do-not-reply at jboss.com
Thu May 26 12:50:06 EDT 2011
Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] created the discussion
"Re: EJB3 annotation question ..."
To view the discussion, visit: http://community.jboss.org/message/607297#607297
--------------------------------------------------------------
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
[http://community.jboss.org/message/607297#607297]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110526/f5ebcd56/attachment.html
More information about the jboss-user
mailing list