"the message listener method throws any exception." is also true.
Because this method can't throw checked exceptions, only option left is runtime exceptions, and that will be system runtime exception as checked application exception are also not allowed in throws block on message.
About Question enthuware.oce-ejbd.v6.2.540 :
Moderator: admin
-
- Posts: 38
- Joined: Fri Aug 16, 2013 11:37 pm
- Contact:
-
- Posts: 38
- Joined: Fri Aug 16, 2013 11:37 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.540 :
Any exception thrown in "PostConstruct" will lead to discard of instance and not MDB instance. MDB instance is a super-set of simple bean class instance, only after "PostConstruct" bean class instance is termed as proper MDB instance. So no point in discarding MDB instance when system exception is thrown from "PostConstruct" method, as in it wasn't even proper MDB instance.
-
- Site Admin
- Posts: 10053
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.540 :
1. You can annotate a runtime exception with @ApplicationException so a message listener can throw such an exception and still not be discarded.
2. The term MDB instance here is just referring to the instance of the bean class, which will indeed be discarded. This is a standard terminology.
HTH,
Paul.
2. The term MDB instance here is just referring to the instance of the bean class, which will indeed be discarded. This is a standard terminology.
HTH,
Paul.
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 29 guests