Hi, I am having some doubts on the study guide provided by, Mikalai Zaikin. Please clarify the same. Notation, i will type every thing from the material in quotes and my doubts without quotes.
1. Chapter 7 -- Section - "Identify correct and incorrect statements or examples about the life cycle of a CMP entity bean. " In Material one of the buller point says -- "The container CAN choose to passivate an entity bean instance WITHIN a transaction. To passivate an instance, the container first invokes the ejbStore() method to allow the instance to prepare itself for the synchronization of the database state with the instance�s state, and then the container invokes the ejbPassivate() method to return the instance to the POOLED state." Doubt --> Is it possible to passivate the bean, if the bean is in the transaction? the same is not possible in the case of statefull session beans.
2. Chapter 7 -- Section --"Identify correct and incorrect statements or examples about the life cycle of a CMP entity bean. " In Material one of the buller point says -- "The container will transition the instance to the pooled state. There are THREE possible transitions from the ready to the POOLED state -- Because of a transaction rollback for ejbCreate(), ejbPostCreate(), or ejbRemove(). " Doubt --> If the transaction is rolled back in ejbRemove() method, where will be the bean ? Is it in pooled state or method ready. Ideally it is in method ready state, because from the state bean wants to move to the pooled state, because the transaction is rolled back, hence the bean will not move to the pooled state. Is it correct?
3. Chapter 7 -- Section --"Identify correct and incorrect statements or examples about the life cycle of a CMP entity bean. " In Material one of the buller point says --"A RuntimeException thrown from any method of an entity bean class (including the business methods and the callbacks invoked by the container) results in the transition to the DOES NOT EXIST state. From the caller�s perspective, the corresponding entity object CONTINUES to exist. The client CAN continue accessing the entity object through its component interface because the container can use a different entity bean instance to delegate the client�s requests. " Doubt --> In entity beans, if the client gets the RuntimeException, can he continue with that EJBObject? Will the container creates new instance of the bean for the client?
4. EJB-QL -- Doubt --> From the select statement can i select the multiple cmp fields, i.e. "select e.name, e.empno from employee as e"
Thanks in Advance..
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Devious Experiments for a Truly Passive Greenhouse!