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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
  • 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!!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic