Exception Listeners

Many messaging applications include consumers who receive messages and perform work but never send any JMS messages. Because these clients are only active when a message is delivered, there is no means to notify them when their JMS Server has failed. JMS provides the ExceptionListener facility to deliver these out-of-band exceptions to clients.

A JMS ExceptionListener asynchronously receives connection error exceptions. ExceptionListener only receives exceptions that cannot be thrown to a method call. For instance, a send call on a broken connection will receive a JMSException, but this exception will not be transmitted to the ExceptionListener.

ExceptionListeners implement javax.jms.ExceptionListener that contains the onException(JMSException) ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.