0 Replies Latest reply on Nov 10, 2006 5:23 PM by Yongjun Jiao

    Should I register an ExceptionListener in MDB for QueueConne

    Yongjun Jiao Newbie

      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.