Page 1 of 1

About Question com.enthuware.ets.scbcd.v5.2.221 :

Posted: Tue Mar 22, 2011 7:51 am
by ETS User
java.io.IOException, javax.name.NamingException, javax.ejb.CreateException are checked exceptions. So, how it is possible to be thrown by the message listener method?

Re: About Question com.enthuware.ets.scbcd.v5.2.221 :

Posted: Tue Mar 22, 2011 6:50 pm
by admin
You are right. Since the onMessage() method of javax.jms.MessageListener interface does not have any throws clause, a JMS MDB's onMessage() method cannot throw checked exceptions. This has now been fixed.

Thanks a lot for your feedback.

Re: About Question com.enthuware.ets.scbcd.v5.2.221 :

Posted: Sun Mar 27, 2011 10:35 am
by Przemek
Now the answer is also wrong, because javax.ejb.EJBException is a RuntimeException and it can be thrown from the onMessage() method.

Re: About Question com.enthuware.ets.scbcd.v5.2.221 :

Posted: Sun Mar 27, 2011 11:03 am
by admin
Fixed. Thanks again!