dcsimg
difference between EJBCreate() and EJBPostCreate()
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kavitha_mula
Posted On:   Thursday, June 15, 2006 10:14 AM

What is the difference between EJBCreate() and EJBPostCreate() and which method of these called first

Re: difference between EJBCreate() and EJBPostCreate()

Posted By:   krunal_shimpi  
Posted On:   Monday, July 10, 2006 05:29 AM


EJBCreate gets called first and then EJBPostCreate().
Main diff bet these methods is that you can invoke methods on Container (EntityContext or SessionContext class methods) only in EJBPostCreate() because, EJBObject reference is available only after EJBCreate and EJBObject knows all details abt container once it is created.

BTW, This is interview question I used to ask.

Re: difference between EJBCreate() and EJBPostCreate()

Posted By:   jhansi_lakshmi  
Posted On:   Friday, June 16, 2006 08:04 AM

EJBCreate() is first called before EJBPostCreate().
EJBCreate()purpose is if we want to insert data into database through our java program just we call seter methods.and it creates bean instances for the record.

EJBPostCreate():if we want to store same type of data in different tables we can use it.
About | Sitemap | Contact