• 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic