站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档

ConnectionEventListener (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档


javax.sql
Interface ConnectionEventListener

All Superinterfaces:
EventListener

public interface ConnectionEventListener
extends EventListener

A ConnectionEventListener is an object that registers to receive events generated by a PooledConnection.

The ConnectionEventListener interface is implemented by a connection pooling component. A connection pooling component will usually be provided by a JDBC driver vendor, or another system software vendor. A ConnectionEventListener is notified by a JDBC driver when an application is finished using its Connection object. This event occurs after the application calls close on its representation of the PooledConnection. A ConnectionEventListener is also notified when a Connection error occurs due to the fact that the PooledConnection is unfit for future use---the server has crashed, for example. The listener is notified, by the JDBC driver, just before the driver throws an SQLException to the application using the PooledConnection.


Method Summary
 void connectionClosed(ConnectionEvent connectionEvent)
          Invoked when the application calls close() on its representation of the connection.
 void connectionErrorOccurred(ConnectionEvent connectionEvent)
          Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.
 

Method Detail

connectionClosed

public void connectionClosed(ConnectionEvent connectionEvent)
Invoked when the application calls close() on its representation of the connection.

Parameters:
connectionEvent - - an event object describing the source of the event

connectionErrorOccurred

public void connectionErrorOccurred(ConnectionEvent connectionEvent)
Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.

Parameters:
connectionEvent - - an event object describing the source of the event


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.