Forums Register Login

MDB ejbCreate And createException

+Pie Number of slices to send: Send
can an ejbCreate() method in MDB throw CreateException? What happens if it does throw? If it's not allowed , then why not? can anybody explain....
+Pie Number of slices to send: Send
You can not throw CreateException in ebjCreate() methods of MDB , session bean and entity bean.the mothods its name begin with "ejb" invoked by container,container does expect get application exception such as CreateException .But you can throw CreateException in Create() methods of session bean and entity bean home interface, but not MDB.beasause MDB have not client, if you throw one, who will receive it.(MDB have not Home interface and component interface.)
[ March 04, 2004: Message edited by: si yi ]
+Pie Number of slices to send: Send
Hi Si
CreateExceptions are allowed to be thrown from ejbCreate methods of session and entity beans but not from MDB beans. See EJB Spec Pg 96 7.10.3.
+Pie Number of slices to send: Send
Also spec section 15.7.3 page 324 - you aren't supposed to even declare any application exception on the ejbCreate for an MDB.
bacon. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1124 times.
Similar Threads
Mock Question
Throw CreateException in callbacks
Transaction in ejbCreate() and ejbPostCreate()
CreateException & FinderException?
Exception question for *REAL EJB MEN* (ok, Kathy, for REAL J2EE GIRLS too)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:35:47.