Hi,
I just found this in the
EJB 1.1 specs in section 9.2.9.
"The Bean Provider must specify a primary key class in the
deployment descriptor. The primary key type must be a legal
value type in RMI-IIOP"
In the deployment descriptor in the spec it says something slightly different:
For a BMP entity bean, you must specify the prim-key-class element in the deployment descriptor but not the primkey-field element. For a CMP entity bean, you must specify the primkey-field element and you may (but are not required to) specify the prim-key-class element.
I guess the reason for this is that with BMP there is no primary key field available so for read-only entities there are no ejbCreate() methods from which the primary key class can be inferred. For CMP beans, there is such a field regardless of the presence of ejbCreate methods so that the primary key type can always be inferred from there.
Cheers
Erik