Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic