[jboss-user] [Messaging, JMS & JBossMQ] - Should I register an ExceptionListener in MDB for QueueConne

yongjun_jiao do-not-reply at jboss.com
Fri Nov 10 17:23:49 EST 2006


I have an MDB running in JBoss 4.0.2. It is listening to Queue A.
My MDB creates a Queue connection and session in ejbCreate() and sends messages to another Queue B in onMessage().

The Queue connection and session my MDB created are supposed to live as long as the MDB. However as you can imagine, the connection mighe be closed due to inactivity,network difficulties,exceptions among other reasons.
Should I register an  ExceptionListener with my MDB so that I can re-establish the connection and session again?

The reason I ask is because the following JBos  wiki comment is confusing me.
http://wiki.jboss.org/wiki/Wiki.jsp?page=IGetIOExceptionPingTimeoutHowDoIFixIt
 I'm inside the application server, how do I install the exception listener?
    * You don't need to for an MDB, JBoss does it for you.
    * For anything else, you should be using the JMS resource adapter which also does it for you.

I think the above comment really means JBoss takes care of the connection problem that the application created. In my case it is connection of Queue A, not Queue B.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985079#3985079

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985079



More information about the jboss-user mailing list