• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbPostCreate

 
RAMA KRISHNA AALLA
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! All

What all we can do inside ejbPostCreate() ?
What is the need of ejbPostCreate() ?

Thx in advance.....

Cheers,
Rama Krishna Chowdary
 
Sven Thor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two things you should do in ejbPostCreate:

- establish relationships with other entity beans, you do this by initializing cmr-fields
- if necessary, pass a reference to your ejb object to other ejb's, you get a reference to your ejb object using ejbCtx.getEJBObject(). You should not use a this reference since clients should never talk directly to the bean object

Both these things cannot be done in ejbCreate() since the primary key is not yet available. So you have to do them in ejbPostCreate() instead.

Br,
ST
 
RAMA KRISHNA AALLA
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thax.......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic