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

Moderator: admin

Post Reply
ETS User

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

Post by ETS User » Tue Mar 22, 2011 7:51 am

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?

admin
Site Admin
Posts: 8540
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin » Tue Mar 22, 2011 6:50 pm

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.
If you like our products and services, please help us by posting your review here.

Przemek

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

Post by Przemek » Sun Mar 27, 2011 10:35 am

Now the answer is also wrong, because javax.ejb.EJBException is a RuntimeException and it can be thrown from the onMessage() method.

admin
Site Admin
Posts: 8540
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin » Sun Mar 27, 2011 11:03 am

Fixed. Thanks again!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest