Package javax.sql
Interface ConnectionEventListener
-
- All Superinterfaces:
EventListener
public interface ConnectionEventListener extends EventListener
An interface used to receive events generated by aPooledConnection.This interface would typically be implemented by a component which manages a connection pool (a connection pool manager). A connection triggers an event to a
ConnectionEventListenereither when the application closes a connection it has been using or when a significant error occurs while the connection is being used.The connection pool manager can return closed connections to the pool for later reuse. Connections experiencing an error should be discarded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnectionClosed(ConnectionEvent theEvent)Notifies theConnectionEventListenerthat an application has called theclosemethod on a pooled connection.voidconnectionErrorOccurred(ConnectionEvent theEvent)Notifies theConnectionEventListenerthat an error has occurred on aPooledConnection.
-
-
-
Method Detail
-
connectionClosed
void connectionClosed(ConnectionEvent theEvent)
Notifies theConnectionEventListenerthat an application has called theclosemethod on a pooled connection.- Parameters:
theEvent- aConnectionEventcontaining details about the source of the event.
-
connectionErrorOccurred
void connectionErrorOccurred(ConnectionEvent theEvent)
Notifies theConnectionEventListenerthat an error has occurred on aPooledConnection. This notification is triggered before theSQLException, which is available through the event argument, is thrown.- Parameters:
theEvent- aConnectionEventcontaining details about the source of the event and theSQLExceptionthat has occurred.
-
-