public interface ConnectionEventListener extends EventListener
一个对象,寄存器被通知的PooledConnection
对象生成的事件。
的ConnectionEventListener
接口通过连接池组件实现。连接池组件通常是由一个JDBC驱动程序供应商或另一个系统软件供应商提供的。JDBC驱动程序的通知ConnectionEventListener
对象当一个应用程序使用完一池连接,监听器注册。通知发生后的应用程序调用的方法在一个PooledConnection
对象表示close
。一个ConnectionEventListener
也通知时发生连接错误而导致PooledConnection
不宜使用,服务器已经崩溃,例如。听众是通知的JDBC驱动程序之前,司机抛出一个SQLException
使用PooledConnection
对象的应用。
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed(ConnectionEvent event)
这
ConnectionEventListener 通知的应用程序调用的方法在一个池连接表示
close 。
|
void |
connectionErrorOccurred(ConnectionEvent event)
这
ConnectionEventListener 通知,发生致命错误与池的连接不再可用。
|
void connectionClosed(ConnectionEvent event)
ConnectionEventListener
通知的应用程序调用的方法
close
在一池连接的表示。
event
-一个事件对象描述事件的来源
void connectionErrorOccurred(ConnectionEvent event)
ConnectionEventListener
通知,发生致命错误与池的连接不再可用。驱动程序将此通知之前将应用程序包含在给定对象的
SQLException
ConnectionEvent
。
event
-一个事件对象描述的事件源和含
SQLException
,司机要把
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.