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
Why do we use ejb?
Enlist the enterprise beans types?
can we stop the execution of a method before completion?
Explain the important elements of ejb?
What are the types of ejb?
List down the steps for the demonstration of ejp persistence mechanism.
What are ejb components?
When was ejb developed?
What is the procedure of ejb container to handle exceptions?
What is ejbdoclet?
What is ejb and how it works?
What do you mean by ejbdoclet?
How does ejb work in java?
What is @autowired required false?
Explain the architectural relationship between JavaBeans and JTA?