Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.540 :

Posted: Sat Aug 24, 2013 1:38 am
by sanju.ait@gmail.com
"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.

Re: About Question enthuware.oce-ejbd.v6.2.540 :

Posted: Sat Aug 24, 2013 1:43 am
by sanju.ait@gmail.com
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.

Re: About Question enthuware.oce-ejbd.v6.2.540 :

Posted: Sun Aug 25, 2013 10:16 am
by admin
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.