Regarding the following question:
Which are legal declarations for a CMP bean's ejbCreate methods
A. public void ejbCreateBigCustomer() throws javax.ejb.CreateException
B. public
String ejbCreateAccount() throws javax.ejb.CreateException
C. static String ejbCreate() throws javax.ejb.CreateException
D. public int ejbCreate() throws javax.ejb.CreateException
E. public final String ejbCreate() throws javax.ejb.CreateException
I answered B and D - The book gave as correct only B.
The specs, chapter 9.8 say:
The Enterprise JavaBeans architecture allows a primary key class to be any class that is a legal Value
Type in RMI-IIOP, subject to the restrictions defined in Subsections 10.6.13 and 12.2.12.
The restrictions are related to the implementation of hashCode() and equals(). As far as I know, int is a RMI-IIOP legal value, as it's a primitive datatype, therefore Serializable and all the rest. So the signature for answer D should be correct.