public interface ConnectionEventListener extends EventListener
An object that registers to be notified of events generated by a
ConnectionEventListener interface 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 a
object when an application is finished using a pooled connection with
which the listener has registered. The notification
occurs after the application calls the method
its representation of a
PooledConnection object. A
ConnectionEventListener is also notified when a
connection error occurs due to the fact that the
is unfit for future use---the server has crashed, for example.
The listener is notified by the JDBC driver just before the driver throws an
SQLException to the application using the
|Modifier and Type||Method and Description|
void connectionClosed(ConnectionEvent event)
ConnectionEventListenerthat the application has called the method
closeon its representation of a pooled connection.
event- an event object describing the source of the event
void connectionErrorOccurred(ConnectionEvent event)
ConnectionEventListenerthat 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 the
SQLExceptioncontained in the given
event- an event object describing the source of the event and containing the
SQLExceptionthat the driver is about to throw
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.