IntelliJ Java IDE
The moose likes EJB and Other Java EE Technologies and the fly likes EJB 2.0 Primary class needed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "EJB 2.0 Primary class needed" Watch "EJB 2.0 Primary class needed" New topic
Author

EJB 2.0 Primary class needed

pradeep anandan
Greenhorn

Joined: Jul 02, 2001
Posts: 25
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

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.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
IntelliJ Java IDE
 
subject: EJB 2.0 Primary class needed
 
Threads others viewed
Is it possible for CMR bean to be field in Compound Primary Key?
Primary Key + Serializable
CMP and primary key
EJB 2.0 or 2.1
What is Hashing In EJB PK Class
developer file tools