Package oracle.ucp.jdbc
Interface ConnectionWithAbandonedTimeout
public interface ConnectionWithAbandonedTimeout
Interface supporting abandoned connection timeout handling for JDBC
java.sql.Connections.
A connection is considered abandoned when there is no activity from the connection to the backend resource for an extended period. By default, the connection pool reclaims the physical connection when a connection is determined to be abandoned.
The Universal Connection Pool supports the
abandonedConnectionTimeout pool
property and provides AbandonedConnectionTimeoutCallback to
allow customized handling of abandoned connections.
Applications use this interface along with the
abandonedConnectionTimeout properties for complete
abandoned-connection handling.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegistersAbandonedConnectionTimeoutCallbackwith this connection.voidRemoves theAbandonedConnectionTimeoutCallbackobject registered with this connection, if any.
-
Method Details
-
registerAbandonedConnectionTimeoutCallback
void registerAbandonedConnectionTimeoutCallback(AbandonedConnectionTimeoutCallback cbk) throws SQLException RegistersAbandonedConnectionTimeoutCallbackwith this connection.- Parameters:
cbk- TheAbandonedConnectionTimeoutCallbackobject to be registered.- Throws:
SQLException- If there is a callback already registered with the connection.
-
removeAbandonedConnectionTimeoutCallback
Removes theAbandonedConnectionTimeoutCallbackobject registered with this connection, if any.- Throws:
SQLException- If callback removal fails.
-