Hey
Saurabh Sahai wrote:
> I have a small query.
>
> The EJB specsec 8.3.2 page 52, note states :
> "The findByPrimaryKey(primaryKey) method is mandatory for all entity Beans"
>
> Also sec 9.4.1 page 65 last paragraph states
> "public primaryKey type or collection ejbFind<METHOD>(...)
>
> The container invokes this method on the instance when the container selects
> the instance to execute a matching client invoked find<METHOD>(...) method."
>
> >From the above 2 points, does'nt this imply that for any entity bean there
> has to be an ejbFindByPrimaryKey(..) method.
>
> If this is the case, should'nt the ejbFindByPrimaryKey be a part of the
> EntityBean interface.
Nope. Two reasons:
a) The ejbFindByPrimaryKey method returns the primary key class, which
is different for each bean
b) When using container managed persistence this method is implemented
by the container and not in the bean
/Rickard
--
Rickard �berg
Computer Science student@LiTH
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
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".