ExceptionListener
public interface ExceptionListener
If a JMS provider detects a serious problem with a connection, it informs the connection's ExceptionListener if one has been registered. It does this by calling the listener's onException() method, passing it a JMSException that describes the problem.
This allows a client to be asynchronously notified of a problem. Some connections only consume messages, so they have no other way to learn that their Connection has failed.
Exceptions are delivered when:
- There is a failure in receiving an asynchronous message
- A message throws a runtime exception
Methods
- onException
public void onException(JMSException exception)
Notify user of a JMS exception.
- Parameters:
- exception: the JMS exception. These are exceptions that result from asynchronous message delivery. Typically, they indicate a problem with receiving a message from the queue manager, or possibly an internal error in the JMS implementation.