Search Interview Questions
Question: What is the life cycle of MDB
Answer: The lifetime of an MDB instance is controlled by the container. Only two states exist: Does not exist and Ready , as illustrated in the following figure:
The life of an MDB instance starts when the container invokes newInstance() on the MDB class to create a new instance. Next, the container calls setMessageDrivenContext() followed by ejbCreate() on the instance. The bean then enters the Ready state and is ready to consume messages.
When a message arrives for the bean, the container invokes the onMessage() method of one of the available instances, passing a Message object in argument. Message s can be consumed and processed concurrently by using multiple instances of the same type.
The container invokes ejbRemove() on the bean instance when it no longer needs the instance. The bean instance can perform clean up operations here.
|
|||||||||||
Question: What is the life cycle of MDB Answer: The lifetime of an MDB instance is controlled by the container. Only two states exist: Does not exist and Ready , as illustrated in the following figure: If you have the better answer, then send it to us. We will display your answer after the approval Rules to Post Answers in CoolInterview.com:-
|
Related Questions | ||
What is lazy loading |
|
|
What is the difference between JNDI context, Initial context, session context and ejb context |
|
|
What is the difference between sessioncontext and entitycontext |
|
|
What is CMR |
|
|
What is the difference between CMP 1.1 and CMP 2.0 |
|
|
With EJB 1.1 specs, why is unsetSessionContext() not provided in Session Beans, like unsetEntityContext() |
|
|
What is the difference between ejbCreate() and ejbPostCreate() |
|
|
What is the difference between optimistic locking and pessimistic locking |
|
|
What are advantages and disadvantages of CMP and BMP |
|
|
Can undefined primary keys are possible with Entity beans?If so, what type is defined? |
|
|
Can undefined primary keys are possible with Entity beans?If so, what type is defined? |
|
|
When two entity beans are said to be identical?Which method is used to compare identical or not? |
|
|
Is instance pooling necessary for entity beans? |
|
|
What is Instance pooling? |
|
|
How can we call cmp? |
|
|
What is the difference between find and select methods in EJB |
|
|
What is handle in EJB |
|
|
What is abstract schema |
|
|
If i throw a custom ApplicationException from a business method in Entity bean which is participating |
|
|
What is the difference b/w sendRedirect() and <jsp: forward>? |
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All EJB Interview Questions & Answers - Exam Mode / Learning Mode
India News Network |