|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface ConnectionEventListener
注册该对象便可获得由 PooledConnection 对象生成的事件的通知。
ConnectionEventListener 接口由连接池组件实现。连接池组件通常由 JDBC 驱动程序供应商或另一个系统软件供应商提供。当使用注册了侦听器的入池连接完成应用程序时,JDBC 驱动程序将向 ConnectionEventListener 对象发出通知。该通知发生在应用程序对其 PooledConnection 对象表示形式调用 close 方法之后。当连接因 PooledConnection 不适合将来使用而发生连接错误时(例如,服务器崩溃),ConnectionEventListener 也将得到通知。JDBC 驱动程序仅在驱动程序使用 PooledConnection 对象向应用程序抛出 SQLException 之前向侦听器发出通知。
| 方法摘要 | |
|---|---|
void |
connectionClosed(ConnectionEvent event)
通知此 ConnectionEventListener 应用程序已对其入池连接的表示形式调用 close 方法。 |
void |
connectionErrorOccurred(ConnectionEvent event)
通知此 ConnectionEventListener 发生了严重错误,入池连接不再可用。 |
| 方法详细信息 |
|---|
void connectionClosed(ConnectionEvent event)
ConnectionEventListener 应用程序已对其入池连接的表示形式调用 close 方法。
event - 描述事件源的事件对象void connectionErrorOccurred(ConnectionEvent event)
ConnectionEventListener 发生了严重错误,入池连接不再可用。驱动程序仅在向应用程序抛出包含在给定 ConnectionEvent 对象中的 SQLException 时发出此通知。
event - 一个事件对象,它描述事件源和包含驱动程序将抛出的 SQLException
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。