On Mon, 21 Aug 2000 14:03:10 +0530, Shiv Kumar <[EMAIL PROTECTED]>
wrote:

>Section 9.4.2 of EJB 1.1 spec (Entity beans with CMP) :
>
>     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.
>
>My question : If the container ignores the return value, why does the method
>prototype require a return type?

To allow CMP beans to be presented to the EJB container as though it was
an BMP bean by producing a BMP layer through inheritance. Since BMP
beans return values on ejbCreate the superclass CMP bean must also
return a value, although that value may be null. The BMP subclass can
extract the primary key from the CMP superclass and return it as a
primary key object.

/Rickard

--
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to