That is in the HomeInterface not in the implementing since the Classes that
are generated by the Container will typically generate methods that wrap
your implementation of ejbCreate and those will take care of things. As far
as I remember spec wont mandate for that throwing clause in the
bean-implementation and hence that code.

   Hope this helps;
Regards,
kris

-----Original Message-----
From: miki [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 8:34 AM
To: [EMAIL PROTECTED]
Subject: ejbCreate and CreateException in EJB 2.0


Some popular EJB 2.0 books show useful entity bean samples, but I
found many ejbCreate() methods without the throws clause for
CreateException in the samples.

For example, this ejbCreate() doensn't have the CreateException clause:

public abstract class CustomerBean implements javax.ejb.EntityBean
{
  public Integer ejbCreate(Integer id) {
    setId(id);
    return null;
  }
...

EJB 2.0 spec (10.6.4 ejbCreate<METHOD> methods) states "The throws
clause must define the javax.ejb.CreateException".

I think this rule applys to CMP entities as well as BMP entities.
Any comments?

Miki
----------------------------------------------------------------
Fusayuki Minamoto
Solution Technology Development Unit
Solution Development Center
Fuji Xerox Co., Ltd.

===========================================================================
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".

===========================================================================
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