ConnectionEvent
public class ConnectionEvent
extends EventObject
提供有关连接相关事件源的信息的Event
对象。 ConnectionEvent
对象在应用程序关闭池连接并发生错误时生成。 ConnectionEvent
对象包含两种信息:
- The pooled connection closed by the application
- In the case of an error event, the
SQLException
about to be thrown to the application
Summary
Public constructors
ConnectionEvent
ConnectionEvent (PooledConnection con)
构造一个使用给定的ConnectionEvent
对象初始化的PooledConnection
对象。 SQLException
默认为null
。
Parameters |
con |
PooledConnection : the pooled connection that is the source of the event |
ConnectionEvent
ConnectionEvent (PooledConnection con,
SQLException ex)
构造一个 ConnectionEvent
给定初始化的对象 PooledConnection
对象和 SQLException
对象。
Parameters |
con |
PooledConnection : the pooled connection that is the source of the event |
ex |
SQLException : the SQLException about to be thrown to the application |
Public methods
getSQLException
SQLException getSQLException ()
检索SQLException
此ConnectionEvent
对象。 可能是null
。
Returns |
SQLException |
the SQLException about to be thrown or null |