This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEB Entity Bean Synch Q & A confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFEB Entity Bean Synch Q & A confusion" Watch "HFEB Entity Bean Synch Q & A confusion" New topic
Author

HFEB Entity Bean Synch Q & A confusion

Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Hi
I am confused at the Q-9 in the chapter entity bean Synchronization.
Question: Which methods from the EntityContext interface can be invoked from within the ejbCreate method?
The answers in the book are getEJBHome,getEJBObject, getCallerPrincipal and setRollBackOnly.
BUT my question is how can getEJBObject be invoked in ejbCreate? i think there is no EJBObject until ejbPostCreate...
can anyone plz explain.

Gul
mini mehta
Ranch Hand

Joined: Oct 22, 2000
Posts: 120
Originally posted by pervaiz gul:
Hi
I am confused at the Q-9 in the chapter entity bean Synchronization.
Question: Which methods from the EntityContext interface can be invoked from within the ejbCreate method?
The answers in the book are getEJBHome,getEJBObject, getCallerPrincipal and setRollBackOnly.
BUT my question is how can getEJBObject be invoked in ejbCreate? i think there is no EJBObject until ejbPostCreate...
can anyone plz explain.

Gul


You are correct, the answer is wrong, it should not have getEJBObject() method
Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
I searched around to see if anyone else has posted the same issue and if there is an explaination for it, but i couldnt find any.
Is there anywhere i can confirm that its an error or not?

Thanks
Sree Nivas
Ranch Hand

Joined: Jul 24, 2003
Posts: 95
This has been already corrected in the authors errata page. Go thru following link:

http://www.oreilly.com/catalog/hfjejb/errata/
Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
thanks that helped.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFEB Entity Bean Synch Q & A confusion
 
Similar Threads
Head first EJB question
Doubts in Chapter-6 HF-EJB
Chapter 6 - Mock Exam 9
Valid operation in ejbCreate for stateless session bean
need explanation