• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.0 Primary class needed

 
pradeep anandan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends
Does in ejb 2.0 CMP Bean we have to make PK Class.
As in many egs I saw there was no PK class defined
Regards,
Pradeep
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Entity EJBs always have to have a primary key, but if the key is an object of and existing Java class (such as java.lang.String) you don't have to wrap it in a custom primary key class.
There is a slight difference in the ejb-jar.xml depending on whether your key is an object or a primary key class and a lot of systems don't detect improper configuration, so use caution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!