Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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

Doubt in HFEJB Question

 
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
 
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?
 
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.
 
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!! ;-)
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic