Forums Register Login

Do we need throw exception in ejbCreate() method??

+Pie Number of slices to send: Send
When I read HFEJB book, it only throws exception in Home interface but not in the bean class for create() method. I download the example code from the website of HFEJB. In that CustomerBean code, I saw it declares throw CreateException in ejbCreate() method. I just confused about this. Is this needed or not?? Cuz when I deploy it without put that exception in ejbCreate(), it failed. With it, I can deploy it without any problem. Any one has experience on this?
Thanks.
+Pie Number of slices to send: Send
Throwing CreateException in the create() methods of the home interface is mandatory for both Session and Entity beans.
Throwing CreateException is also mandatory for the corresponding ejbCreate()methods of the entity beans, but optional for Session beans.
Usually we declare CreateException at both the places for all beans.
There are many people who have read/reviewed Kathy's book in the SCBCD forum. I am sure you would get more answers there for ur specific question.
+Pie Number of slices to send: Send
Thanks a lot Vish!!
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 688 times.
Similar Threads
allowed operation in ejbCreate() of stateless session bean
ejbPostCreate() for session/message beans
Exception question for *REAL EJB MEN* (ok, Kathy, for REAL J2EE GIRLS too)
Exception-Doubt
Getting EJBObject from ejbCreate() on stateless bean
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:33:38.