Abandoned Connection Timeout Events Occurring Repeatedly And Connection Not Reclaimed by The Connection Cache When Invoking handleAbandonedConnection Method in JDBC 11.2
(Doc ID 1542696.1)
Last updated on MARCH 10, 2019
Applies to:JDBC - Version 18.104.22.168.0 to 22.214.171.124.0 [Release 11.2]
Information in this document applies to any platform.
Application uses the Implicit Connection Cache feature with JDBC driver 126.96.36.199.
Oracle® Database JDBC Developer's Guide, 11g Release 2 (11.2)
21 Implicit Connection Caching
states the following about Connection Cache Callbacks offered by the Implicit Connection cache feature:
The implicit connection cache offers a way for the application to specify callbacks to be called by the connection cache. Callback methods are supported with the
OracleConnectionCacheCallback interface. This callback mechanism is useful to take advantage of the special knowledge of the application about particular connections, supplementing the default behavior when handling abandoned connections or when the cache is empty.
An application can register a ConnectionCacheCallback on an OracleConnection. When a callback is registered, the connection cache calls the handleAbandonedConnection method of the callback before reclaiming the connection. If the callback returns true, then the connection is reclaimed. If the callback returns false, then the connection remains active.
Based on this, the Abandoned Connection Timeout functionality of the Implicit Connection Caching feature should invoke defined OracleConnectionCacheCallback class and specifically the handleAbandonedConnection method, which when returning true, the connection should then be reclaimed by the connection cache. This does not happen, and instead the Abandoned Connection Timeout callback is called again and again for the same connection until the application is terminated.
This behavior was discovered when moving from 188.8.131.52 version of ojdbc6.jar to the 184.108.40.206 version in a recent application upgrade.
Testing shows that the abandoned connection timeout handling works as documented in JDBC driver 220.127.116.11 but not in any version of JDBC 11.2.
Upgrade from JDBC driver 18.104.22.168 to JDBC driver 22.214.171.124.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document