• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Doubt in HFEJB Question

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!! ;-)
 
reply
    Bookmark Topic Watch Topic
  • New Topic