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 08, 2017
Applies to:JDBC - Version 126.96.36.199.0 to 188.8.131.52.0 [Release 11.2]
Information in this document applies to any platform.
Application uses the Implicit Connection Cache feature with JDBC driver 184.108.40.206.
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 220.127.116.11 version of ojdbc6.jar to the 18.104.22.168 version in a recent application upgrade.
Testing shows that the abandoned connection timeout handling works as documented in JDBC driver 22.214.171.124 but not in any version of JDBC 11.2.
Upgrade from JDBC driver 126.96.36.199 to JDBC driver 188.8.131.52.
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
|This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.|