Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in HFEJB Question

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFEJB Pno-:369 Qno-:9
The question is
Which method(s) from the EntityContext interface can be invoked from within the ejbCreate method?
A. getEJBHome()
B. getEJBObject()
C. getCallerPrincipal()
D. getUserTransaction()
E. setRollBackOnly()

Answer is A,B,C,E

But according me answer should be A,C,E. It is not possible to access getEJBObject() within ejbCreate method


Please correct me it i am wrong.
Thanks
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejbCreate is invoved only when the client invokes create on the
Component interface.

That means the EJBObject is already there, so why do you think
we cannot get the EJBObject from ejbCreate?
 
Sanjeev BhimaRao
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The create method is part of EJBHome and not the component interface. So, A,C and E are the right answers. Kindly refer to HFEJB errata confirmed list. This error is corrected in the list.
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!!!

From errata:
link:

http://www.oreilly.com/catalog/hfjejb/errata/hfjejb.confirmed

[369] Question 9;
The answer to question 9 should not have B checked. The EBJObject is not available during an entity bean's ebjCreate()

Just and aside here: In my HFEJB book i have that correct..i mean..on the page 369, the option B is NOT selected!!!

Hugs!! ;-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic