This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEJB p.96: How does EJB Lifecycle depend on different bean types? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFEJB p.96: How does EJB Lifecycle depend on different bean types?" Watch "HFEJB p.96: How does EJB Lifecycle depend on different bean types?" New topic
Author

HFEJB p.96: How does EJB Lifecycle depend on different bean types?

Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Hi all,

please view the "Sharpen your pencil" example from the HFEJB book p.96 and look at the RED marks. Can someone explain more on how the EJB lifecycle depends on the bean type .



Regards,
Darya


SCJP, SCJD, SCWCD, SCBCD
Ramakrishnan Viswanathan
Ranch Hand

Joined: Aug 24, 2005
Posts: 90
Stateful session bean: When client calls create(...), a new EJB object and a new bean instance is created by the container.

Stateless session bean: Bean creation and EJBObject creation are not tied to each other. The bean will not be tied to the EJBObject until the client makes a business method call.

Entity Beans: Bean instance creation and entity creation are not tied to each other. ejbCreate() is called on the bean before even creating an EJB object (primary key is required). And there are differences on who creates the entity in the underlying store between BMP and CMP entity beans.

MDB: Bean pulled out from the pool by container to service a message request from messaging service. (of course no client/home+remote interfaces here!)

If you look at the sequence diagrams for creation of the different bean types in HFEJB, you will notice that the order changes.


Regards<br />Ram<br /> <br />SCJP 1.4, SCBCD 1.3, (SCEA)
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Don't worry it'll become clearer later in the book.

However get the EJB 2.0 specification. You can search that electronic document faster for an answer than you can flip through the paper copy of HFEJB - and HFEJB references the specification in most of the mock answer questions.

Also make sure that you update your HFEJB with theconfirmed errata.
Before you report any new ones check the unconfirmed errata.
Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
In HF-EJB book that I have, the page #96 is not displayed as it appears in Darya's image above. In my book, only 2nd point is mentioned all other are blank. Please advise if I have the latest edition/print of the book!

Thanks very much!


SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
That page comes from the supplementary material (on PDF) "Sharpen Your Pencil exercise answers" found on the Sierra/Bates web siteWickedly Smart
Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
Peer Boss! You rock!!

Hats off to your help. People hardly look back after getting certified. I really feel great about you responding in this forum!

THANKS A LOT!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFEJB p.96: How does EJB Lifecycle depend on different bean types?