I say that I removed my previous post Because primary keys should be RMI-IIOP compliants. I can't see where it says that it must not be a primitive. So it should be ok. I wonder if returning "0" would fail ?
Although primary keys can be primitive wrappers (Integer, Double, Long, etc.), primary keys cannot be primitive types (int, double, long, etc.); some of the semantics of EJB interfaces prohibit the use of primitives. For example, the EJBObject.getPrimaryKey() method returns an Object type, thus forcing primary keys to be Objects. As you learn more about the EJB, you'll discover other reasons that primitives can't be used for single-field keys.
[ August 03, 2007: Message edited by: Ulf Dittmer ]