Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What should ejbCreate() return?  RSS feed

 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According to EJB1.1 specification what should the ejbCreate() method of CMP bean return.
Should it return null or promary key?
O'relly book seems to be saying that it should return null.
thanks,
RamdhanYK
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if you are using CMP, ejbCreate should return null.
(besides, it also works if you return the pk!.. but according
to the spec, programmers have to return null)
If you are using BMP, you have to return the primarykey.
------------------
Marco Barenkamp
____________________________________________
L M I N T E R N E T S E R V I C E S AG
Senior Trainer & Architect,
BEA Certified Enterprise Developer
Sun Certified Programmer for the Java2 Platform
Sun Certified Web Component Developer for the Java2 Platform
Sun Certified Developer for the Java 2 Platform
Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition (PI)
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marco!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!