It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes ejbPostCreate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejbPostCreate" Watch "ejbPostCreate" New topic


vara prasad
Ranch Hand

Joined: Dec 21, 2004
Posts: 47
what is the purpose of ejbPostCreate?
Difference between ejbCreate Vs ejbPostCreate?
Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
In ejbPostCreate() only the bean can pass a reference to itself ie its EJBObject and not in ejbCreate(). check what happens when u try creating an entity...u will understand the need for ejbPostCreate().
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
A very common use for ejbPostCreate() is setting relationships for CMR entity beans. You must do it in ejbPostCreate() snice it doesn't have a primary key yet in ejbCreate().
I agree. Here's the link:
subject: ejbPostCreate
It's not a secret anymore!