站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java Platform, Enterprise Edition v1.4 API Specifications

ExceptionListener (Java 2 Platform Ent. Ed. v1.4) - Java Platform, Enterprise Edition v1.4 API Specifications

JavaTM 2 Platform
Ent. Ed. v1.4

javax.jms
Interface ExceptionListener


public interface ExceptionListener

If a JMS provider detects a serious problem with a Connection object, it informs the Connection object's ExceptionListener, if one has been registered. It does this by calling the listener's onException method, passing it a JMSException argument describing the problem.

An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn that their connection has failed.

A JMS provider should attempt to resolve connection problems itself before it notifies the client of them.

Version:
1.0 - 9 March 1998
Author:
Mark Hapner, Rich Burridge
See Also:
Connection.setExceptionListener(ExceptionListener)

Method Summary
 void onException(JMSException exception)
          Notifies user of a JMS exception.
 

Method Detail

onException

public void onException(JMSException exception)
Notifies user of a JMS exception.

Parameters:
exception - the JMS exception

JavaTM 2 Platform
Ent. Ed. v1.4

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.