|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2.0.4) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AbandonedConnectionTimeoutCallback
The callback interface for the abandoned connection timeout feature.
This allows applications to provide customized handling for abandoned
connections. Also see the related properties on
UniversalConnectionPool and PoolDataSource.
handleTimedOutConnection(...) method is invoked when a
borrowed connection is deemed abandoned by the Universal Connection Pool.
Applications can choose to completely override the pool's handling,
invoke additional handling actions, or simply assume the pool's default
handling. For example, JDBC applications can invoke cancel(),
close(), and rollback() methods on the abandoned
connection within this method.
It is an error to register more than one
AbandonedConnectionTimeoutCallback
on the same connection. Any such attempt will result in a
UniversalConnectionPoolException at the pool layer, or an
exception specific to the type of a Universal Connection Pool Adapter
(for example, JDBC, JCA, and so forth) like java.sql.SQLException.
- See Also:
UniversalConnectionPool,
UniversalPooledConnection,
PoolDataSource,
ConnectionWithAbandonedTimeout
Method Summary
boolean
handleTimedOutConnection()
Sets whether or not the connetion pool is responsible for
handling abandoned connections.
Method Detail
handleTimedOutConnection
boolean handleTimedOutConnection()
- Sets whether or not the connetion pool is responsible for
handling abandoned connections. This method is called by the
connection pool on the connection that is deemed abandoned to allow
applications to customize abandoned connection handling.
The method implementation must return
true if the application
handles the abandonedConnectionTimeout in place of the pool,
and must return false if the application wants the pool to
take over the abandoned connection handling. In the former case,
applications have the option of simply holding on to the borrowed
connection or performing some actions and returning the abandoned
connection to the pool. For the pool layer, this means calling
returnConnection(); while, for the pool adapter layer, this
means calling close() on the connection proxy.
- Returns:
- If the application's customized handling overrides the pool's
actions, return
true; otherwise, return
false.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Oracle® Universal Connection Pool for JDBC Java API Reference
11g Release 2 (11.2.0.4)
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2007, 2019, Oracle and/or its affiliates. All rights reserved.