Create a class which will act as the Primary key for the Entity bean. It should have a constructor which initializes all of the composite elements of the key. This needs to be serializable and override hashCode() and equals() appropriately so that isIdentical() will work correctly.
From there the rest is easy.
If this is CMP, then just mark the base fields as being key fields.
VisualAge for
Java (and WSAD) make doing this very easy.
------------------
Gary Craig,
Author of
Enterprise Java (tm) Programming with IBM Websphere
Gary Craig,<br />Author of <a href="http://www.amazon.com/exec/obidos/tg/detail/-/032118579X/qid=1060361076/sr=1-11/ref=sr_1_11/102-0063041-4226517?v=glance&s=books" target="_blank" rel="nofollow">Enterprise Java (tm) Programming with IBM Websphere, 2nd edition</a><br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182116/qid=1060361262/sr=1-30/ref=sr_1_30/102-0063041-4226517?v=glance&s=books" target="_blank" rel="nofollow">Introduction to Web Application Development with IBM Websphere Studio (Certification Guide, Test 285)</a>