• Post Reply Bookmark Topic Watch Topic
  • New Topic

'ejbCreate' methods should be coded to return a null value. is it true?

 
NareshAnkuskani Kumar
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a statement made in the EJB 2.0 specification; page no 171

The statement made is related to ENTITY BEANS.

STATEMENT :The implementation of the Bean Provider�s ejbCreate<METHOD>(...) methods should be coded to return a null.

does it mean even though we know the value of the primary key field do we need to return a null value from the 'ejbCreate' method.

please clarify me wheather i should always return a 'null' value (or) i can return the primary key field value if i known, from the ejbCreate method?
 
Sunil Vasudevan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Return null. It is the container's job to provide you with the primary key back and not a bean developers.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!