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 is possible for an ejb client to marshal an object of class java.lang.class to an ejb?
What optimization could I use if the ejb container is the only point of write access to the database?
What is ejb role in j2ee?
What is applicationscoped?
What does it mean to be stateless?
How to create ejb project in eclipse?
How is consistency maintained by Stateful Session through transaction updates ?
What are stateless applications?
Differentiate Phantom from Un-repeatable?
What are the callback annotations for the stateless bean?
What happens when I change a value in the httpsession from inside an ejb?
What is stateless authentication?
What is session bean?
What were entity beans?
A client wants to preserve the reference to the ejbhome object of an enterprise bean instance and use it later. Which of the following can be serialized for this purpose?