• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Mock Exam Question

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic