-
What is the life cycle of MDB
Answered by Nikhil on 2005-05-11 01:52:59: 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...
-
Is stateless Sessiob bean create() method contains any parameters
Answered by Jey Ramasamy on 2005-05-08 20:04:33: No. This method must not contain any input parameters and cannot be overloaded as well.
-
What are the various transaction attributes and differences between them
Answered by Jey on 2005-05-08 18:01:39: There are six transaction attributes that are supported in EJB. 1. NotSupported 2. Supports 3. Required 4. RequiresNew 5. Mandatory 6. Never
-
What is Message Driven Bean
Answered by Jey on 2005-05-08 12:30:37: Message Driven Bean (MDB) is an enterprise bean which runs inside the EJB container and it acts as Listener for the JMS asynchronous message . It does not have Home and Remote interface as Session or Entity bean. It is called by container when container receives JMS asynchronous message. MDB has to implement MessageListener which has a method onMessage(Message...
-
What is the difference between activation and passivation
Answered by Jey on 2005-05-08 11:55:29: Activation and Passivation is appilicable for only Stateful session bean and Entity bean. When Bean instance is not used for a while by client then EJB Container removes it from memory and puts it in secondary storage (often disk) so that the memory can be reused. This is called Passivation. When Client calls the bean instance again then...
-
-
-
If my session bean with single method insert record into 2 entity beans, how can I know that the process is done in same transaction (the attributes for these beans are Required)
If your method in the session bean is already running under a transaction the calls to any other bean which have been deployed with trans-attribute 'Required' will be executed within the same transaction context. So if your session bean is using container-managed transactions and your method is deployed with 'Required', 'RequiresNew' or 'Mandatory', you can safely assume that the calls to your entity...
-
EJB Interview Questions
Ans