There are two options for the primary key type when using automatic key generation in EJB-CMP entity beans:
java.lang.Object The EJB 2.0 specification requires this type for entity beans that have automatically generated keys. However, using java.lang.Object makes client coding difficult, particularly if the home interface has finder methods that take key values as input. In this case, you do not know what the actual Java key type is until after deploying the component.
java.lang.Integer or other integer types EAServer allows you to use an integer type with automatic key generation configured. You can also use other integer types, as long as you specify the wrapper class name, such as java.lang.Long or java.math.BigDecimal with scale of zero.