From the
EJB 2.0 specification (14.1.2:
ejbCreate, ejbPostCreate):
The ejbCreate(...) methods must be defined to return the primary key class type. The implementation of the ejbCreate(...) methods should be coded to return a null. The returned value is ignored by the Container.
Note: The above requirement is to allow the creation of an entity bean with bean-managed persistence by subclassing an EJB 1.1 entity bean with container-managed persistence. The Java language rules for overriding methods in subclasses requires the signatures of the ejbCreate(...) methods in the subclass and the superclass to be the same.
The above extract explains the reason to be support for subclassing.
[ July 21, 2003: Message edited by: Lasse Koskela ]