• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Methods that can be invoked in ejbCreate() of Entity Bean

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In HFE book pg 369 Question 9:

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().


The correct answers were stated as A,B,C,E.

But how can option "B" can be correct

coz in pg 338 the book states that

" it's too early to get a reference to your EJBObject or primary key, coz the container is still waiting for you to finish your ejbCreate().

Please correct me if i am wrong ?
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I marked the answer as A C E, as B cannot be the Answer .. it can invoke getEJBObject only after ejbCreate() ie in ejbPostCreate and beyond.

It must be a print mistake!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic