Explain Stateful session bean life cycle?
Answer Posted / srinivas
* A stateless session bean instance’s life starts when
the container invokes newInstance() on the session bean
class to create a new instance. Next, the container calls
setSessionContext() followed by ejbCreate() on the instance.
The container can perform the instance creation at any
time—there is NO relationship to a client’s invocation of
the create() method.
* The session bean instance is now ready to be
delegated a business method call from any client.
* When the container no longer needs the instance
(usually when the container wants to reduce the number of
instances in the method-ready pool), the container invokes
ejbRemove() on it. This ends the life of the stateless
session bean instance.
| Is This Answer Correct ? | 4 Yes | 9 No |
Post New Answer View All Answers
Is ejbCreate() method mandatory while defining a Session Bean?
What do you understand by session facade?
What do you mean by abstract schema?
Is decorator an ejb design pattern?
Are entity beans allowed to create() methods?
What is the advantage of using entity bean for database operations, over directly using jdbc api to do database operations? When would I use one over the other?
What is stateless ejb?
In what format is the conversational data written to the disk?
What are stateless functions?
What does statelessness mean?
What are ejbs used for?
Differentiate “find a method” from “select method” in EJB ?
Which of the recommended practices to be performed in the ejbpassivate() method of a stateful session bean?
What is the difference between Session bean and Entity bean?one?
What is the difference between find and select methods in ejb?