- 
- All Superinterfaces:
- EventListener
 
 public interface ConnectionEventListener extends EventListener An object that registers to be notified of events generated by a PooledConnectionobject.The ConnectionEventListenerinterface 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 JDBC driver notifies aConnectionEventListenerobject when an application is finished using a pooled connection with which the listener has registered. The notification occurs after the application calls the methodcloseon its representation of aPooledConnectionobject. AConnectionEventListeneris also notified when a connection error occurs due to the fact that thePooledConnectionis unfit for future use---the server has crashed, for example. The listener is notified by the JDBC driver just before the driver throws anSQLExceptionto the application using thePooledConnectionobject.- Since:
- 1.4
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnectionClosed(ConnectionEvent event)Notifies thisConnectionEventListenerthat the application has called the methodcloseon its representation of a pooled connection.voidconnectionErrorOccurred(ConnectionEvent event)Notifies thisConnectionEventListenerthat a fatal error has occurred and the pooled connection can no longer be used.
 
- 
- 
- 
Method Detail- 
connectionClosedvoid connectionClosed(ConnectionEvent event) Notifies thisConnectionEventListenerthat the application has called the methodcloseon its representation of a pooled connection.- Parameters:
- event- an event object describing the source of the event
 
 - 
connectionErrorOccurredvoid connectionErrorOccurred(ConnectionEvent event) Notifies thisConnectionEventListenerthat a fatal error has occurred and the pooled connection can no longer be used. The driver makes this notification just before it throws the application theSQLExceptioncontained in the givenConnectionEventobject.- Parameters:
- event- an event object describing the source of the event and containing the- SQLExceptionthat the driver is about to throw
 
 
- 
 
-