This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why there is difference in ejbCreate for BMP & CMPs?  RSS feed

 
Vikram Deshmukh
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have one doubt related to EJBs.
For an Entity beans, we have a callback method ejbCreate(someParam).
My Qn is, related to Container Managed Persistent beans, return type for ejbCreate is void. But, for Bean Managed Persistent beans, return type for ejbCreate is key object.
Why is this different ?
Any ideas ?
with regards,
vikram.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The the declared return type is the Primary Key for both BMP and CMP. The difference is that in BMP you need to return an actual Primary Key Object, but in CMP you simply return null because the Container is going to do all the work for you.
[ September 24, 2002: Message edited by: Chris Mathews ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!