Referring to the
EJB 2.0 Spec on Session Beans...
--------------------------
7.10.3 ejbCreate<METHOD> methods
The throws clause may define arbitrary application exceptions, possibly including the javax.ejb.CreateException.
7.10.6 Session bean's remote home interface
The throws clause must include javax.ejb.CreateException.
------------------------------
Referring to the EJB 2.0 Spec on Entity Beans...
-------------------------------
10.6.4 ejbCreate<METHOD> methods
The throws clause must define the javax.ejb.CreateException.
10.6.10 Entity bean's remote home interface
The throws clause of a create<METHOD> method must include the javax.ejb.CreateException.
----------------------------------------
It is a MUST for create() in home interface but NOT A MUST for ejbCreate() in the Bean. Why ?
Isn't that all application exceptions must match between
create and ejbCreate,
remove and ejbRemove and
find and ejbFind ?
This issue struck me when I saw that on page 268 of HF-EJB does not have a CreateException for its ejbCreate in the CustomerBean EB.
To add to my confusion, in the Spec :
------------------------------
10.7.3 ejbFind<METHOD> methods
The throws clause must define the javax.ejb.FinderException.
------------------------------
but on the same page of HF-EJB, those ejbFind<methods> do not throw !
Please clarify. Thanks !!!