Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ConnectionEventListener

public interface ConnectionEventListener
implements EventListener

javax.sql.ConnectionEventListener


An interface used to receive events generated by a PooledConnection.

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 ConnectionEventListener either 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.

Summary

Public methods

abstract void connectionClosed(ConnectionEvent theEvent)

Notifies the ConnectionEventListener that an application has called the close method on a pooled connection.

abstract void connectionErrorOccurred(ConnectionEvent theEvent)

Notifies the ConnectionEventListener that an error has occurred on a PooledConnection.

Public methods

connectionClosed

Added in API level 1
void connectionClosed (ConnectionEvent theEvent)

Notifies the ConnectionEventListener that an application has called the close method on a pooled connection.

Parameters
theEvent ConnectionEvent: a ConnectionEvent containing details about the source of the event.

connectionErrorOccurred

Added in API level 1
void connectionErrorOccurred (ConnectionEvent theEvent)

Notifies the ConnectionEventListener that an error has occurred on a PooledConnection. This notification is triggered before the SQLException, which is available through the event argument, is thrown.

Parameters
theEvent ConnectionEvent: a ConnectionEvent containing details about the source of the event and the SQLException that has occurred.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.