Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

HFEB Entity Bean Synch Q & A confusion

 
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
 
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
 
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.
 
Hey! You're stepping on my hand! Help me tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic