1. there is no such method. you cant remove the entity bean. its the container wish not the clients. also the question here is about EJBOject reference. 2. wrong. only entity is deleted not entity bean instance. i suppose ejbPassivate() is called. 3. absolutely right. 4. right.
hey my first reason is wrong.. if you have remove the entity is removed.. i confused entity with stateless..sorry.
Joined: Sep 28, 2002
Cheenu Thanks for the reply
if you have remove the entity is removed..
SO is my answer correct? Because the question is talking about bean's EJB object referencewhere as calling remove method will also delete the row from the database.
These questions are from Head First EJB page 323. So i presume that there is nothing wrong with the questions.
2. wrong. only entity is deleted not entity bean instance. i suppose ejbPassivate() is called.
HFE page 321: A Bean doing on ejbRemove() will not be passivated before going back to the pool. Since it is mentioned in the question that the entity is deleted from the database so i guess ejbRemove() should be invoked? [ August 15, 2006: Message edited by: Prakash Dwivedi ]
Both 1 and 2 are trick questions (see the answers to the sharpen your pencil; pdf's are available online, search this forum for links to it). 1. There is no method to tell the container you are done using an entuty bean. 2. ejbRemove is called before the entity is deleted from the database. and there is no method that is called after this happens.