• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbCreate() legal declarations

 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you tell me why:

public int ejbCreate() throws javax.ejb.CreateException

is not a valid create method in a CMP entity bean?
 
Will Hunt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to EJB specification Page 197, the return type of ejbCreate()
should be primary key class, which must provide suitable implementation of hashCode() and equals(Object) methods.

So that will rule out primitives, it can be wrapper classes though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic