Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEB Entity Bean Synch Q & A confusion

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks that helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic