A ConnectionEventListener is an object that registers to receive events generated by a PooledConnection.
The ConnectionEventListener interface is implemented by aconnection pooling component. A connection pooling component willusually be provided by a JDBC driver vendor, or another system softwarevendor. A ConnectionEventListener is notified by a JDBC driver whenan application is finished using its Connection object. This event occursafter the application calls close on its representation of thePooledConnection. A ConnectionEventListener is also notified when aConnection error occurs due to the fact that the PooledConnection is unfitfor future use---the server has crashed, for example. The listener isnotified, by the JDBC driver, just before the driver throws anSQLException to the application using the PooledConnection.
connectionClosed(ConnectionEvent event) Invoked when the application calls close() on its representation of the connection. | |
connectionErrorOccurred(ConnectionEvent event) Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application. |
public voidconnectionClosed(ConnectionEvent event)
Invoked when the application calls close() on its representation of the connection.
event
- an event object describing the source of the eventpublic voidconnectionErrorOccurred(ConnectionEvent event)
Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.
event
- an event object describing the source of the event