About Question enthuware.oce-ejbd.v6.2.452 :
Moderator: admin
-
- Posts: 38
- Joined: Fri Aug 16, 2013 11:37 pm
- Contact:
About Question enthuware.oce-ejbd.v6.2.452 :
MyException is not annotated with @ApplicationException.
Than how it is Application Exception?
Than how it is Application Exception?
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
Any checked exception is considered an application exception.
If you like our products and services, please help us by posting your review here.
-
- Posts: 9
- Joined: Thu Feb 27, 2014 11:47 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
When used in no transaction context, does this mean @ApplicationException annotation only makes sense when used to define run time exceptions?
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
Regarding to the last option :
Checked exception can be non-recoverable just like unchecked exception.
This option may be true if MyException is non-recoverable.The client will get EJBException that wraps MyException
Checked exception can be non-recoverable just like unchecked exception.
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
What do you mean by "non-recoverable"?
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
According to Frits' notes, p.58:
I've not figured out what kind of checked exceptions that cannot be recovered yet.if the EJB method performs an operation that results in a checked exception that the bean method cannot recover, the bean method should throw the EJBException that wraps the original exception.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
Actually, this quote comes from the spec on p. 383:
If the bean method performs an operation that results in a checked exception[76] that the bean method cannot recover, the bean method should throw the javax.ejb.EJBException that wraps the original exception
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.452 :
Ok, that is on programmer's discretion. If the programmer thinks that there is no point in continuing further upon receiving a checked exception then he can wrap it into an EJBException. This is same as the bean throwing an EJBException in other cases. The container will discard the bean.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 51 guests