0 Replies Latest reply on Dec 2, 2005 1:07 AM by Adrian Brock

    ExceptionListeners

    Adrian Brock Master

      It should be possible to give a better error message than the "need to setExceptionListener"
      by attaching the allocation stacktrace from createConnection() to the error message.

      Additionally, there are at least two cases where JBossMQ could automatically install
      a simple exception listener.

      1) Until a receiver or transaction is established,
      just adding an exception listener that close()s the connection should be enough.
      Any attempt to use a jms object after the failure would give an error message saying the
      connection was closed couple with the I/O or network error that caused the problem.

      2) Even if a receiver is established. If it is just AUTO_ACKNOWLEDGE with only MessageListeners,
      it would be possible to install an exception listener that automatically reconnects the sessions/listeners
      to the subscriptions.

      Once a user does receive(), starts using CLIENT_ACKNOWLEDGE or transactions they are on their own.
      There is nothing JMS can assume about the required semantics?