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
What’s new in the ejb 2.0 specification?
What is Enterprise JavaBeans Query Language (EJB QL)?
Explain the concept of ejb ql?
Which is more beneficial: CMP or BMP?
Can beans who are involved in transaction have 'passivation' process?
What is ejb and how it works?
How does the server decide which beans to passivate and activate?
What is ejb javatpoint?
What is jar, war, and ear?
What is ejb context?
What’s the difference between hibernate and ejb 3? Don’t you think ejb 3 is just a clone of hibernate?
Is it legal to have static initializer blocks in ejb?
Name the attributes of javax.ejb.stateful.
What is activemq used for?
Differentiate Conversational from Non-conversational interactions?