• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbCreate?

 
Pourang Emami
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it true that in an CMP Entity Bean, return type for ejbCreate should ALWAYS be "String"?
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Return type is the PK object for that Entity bean.
For session beans ejbCreate() always returns void.
Regards
Maulin
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, the entity bean's ejbCreate() method must return null in order to comply with the spec.
Note that the bean's primary key class must provide a suitable implementation of the hashCode and equals keys.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic