ExceptionListener

public interface ExceptionListener

If a JMS provider detects a serious problem with a Connection, it will inform 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 would have no other way to learn their Connection has failed.

Exceptions are delivered when:

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.



© IBM Corporation 1997, 2002. All Rights Reserved