Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Mock Exam Question

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

8. At what point, precisely, in the life-cycle is a container-managed entity bean considered created?

A. Immediately prior to the execution of its ejbCreate() method
B. Immediately after the execution of its ejbCreate() method
C. After the CMP bean's data has been committed to the underlying persistent datastore
D. During the execution of its ejbPostCreate() method



8. At what point, precisely, in the life-cycle is a container-managed entity bean considered created?
D is incorrect Answer, (B) is correct: Immediately after the execution of its ejbCreate() method

Why
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought "D" was right too. According to the spec, page 207, there is no EJBObject immediately after the ejbCreate<M> method. Although the event following ejbCreate<M> next event is a "new" on the EJBObject. It's not a very meaningful question anyway because the bean can't do anything until ejbPostCreate<M> starts, and the client can't do anything until ejbPostCreate<M> completes and the home supplies the reference to the component object.

--Dale--
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that B is correct. An entity bean does not need access to an EJB object to be a bean. Think about a passivated bean: the container passivates a bean in order to disassociate it from an EJB object and to move it back into the pool. There is no suggestion that a bean which is in the pool is just an ordinary object instead of a bean.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic