Paul Sanghera wrotes in his book, that it is not necessary to declare a CreateException in the throws-clause of ejbCreate() and ejbPostCreate(), if you do not explicitly throw a CreateException in your code.
Hence I have removed all CreateExceptions from ejbCreate() and ejbPostCreate(). After that, I have deployed my beans again in JBoss
, and now I will get the following warnings:
WARN [verifier] EJB
Method : public RecipePosPK ejbCreate(int, RecipePos)
Warning: The throws clause must define the javax.ejb.CreateException.
Must I declare javax.ejb.CreateException in the throws-clause of ejbCreate() and ejbPostCreate(), even if I do not throw this exception?