-
1. Re: Lifecycle\scope of Stateful Session Beans
lightguard Jul 22, 2011 1:47 AM (in response to roflchap)I'm actually not sure what to say on this one. Maybe someone else has an answer. Of course the best way is to try it and find out :)
-
2. Re: Lifecycle\scope of Stateful Session Beans
swd847 Jul 22, 2011 1:49 AM (in response to roflchap)Session in this case does not mean Session in terms of the web session, but rather a session between the client and the ejb.
This bean will live through the request, and then be destoryed.
-
3. Re: Lifecycle\scope of Stateful Session Beans
haye Jul 22, 2011 1:04 PM (in response to roflchap)Stateful session beans can belong to CDI contexts. The container takes control over its construction/destruction. For a request-scoped SFSB, a new instance is created per request and destroyed at the end of the request (the container will call the @Removes method). The same applies to session-scoped and conversation-scoped SSBS. That is, when the session times out or when conversation.end() is called, the container destroys the SFSB and creates a new instance for each new session or conversation.