Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the exact use of ejbPostCreate()

 
Sanju
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
what is the exact use of ejbPostCreate().
Mohan.
 
Mariusz Malinowski
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Using ejbPostCreate (when you develop EJB CMP) you can set CMR fields. Wchich is as far as I know impossible when you use ejbCreate method.
The ejbPostCreate is invoked after ejbCreate method.

Regards,

Mariusz
 
Thomas Manthey
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whatever you wish to execute before an EJBObject make your bean accessable for the client can be put in ejbPostCreate(). An oftenly seen task (as stated above) in ejbPostCreate() is setting up references to other existing beans, as relationships can not be established before... But you could also perform other kinds of initialization.
[ December 16, 2004: Message edited by: Thomas Manthey ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic