Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Bug in OracleImplicitConnectionCache for ojdbc8.jar 21.5.0.0?

User_CJ60AFeb 17 2023

Is this behavior explicitly by design or a bug?

When we upgraded oracle jar from 11.2.0.3.0 to Oracle JDBC jar 21.5 (ojdbc8.jar 21.5.0.0) , we saw difference in session and connection handling. When connections are not closed properly , the inactive sessions piled up and the DB crashed. We did not see this issue in ojdbc6.jar.

In oracle 6 we have the class OracleImplicitConnectionCache , in this we have the below code where the inactive sessions are removed based on a configuration for time.

private void processInactivityTimeout(OraclePooledConnection paramOraclePooledConnection) throws SQLException { long l1 = paramOraclePooledConnection.getLastAccessedTime(); long l2 = System.currentTimeMillis(); if ((getTotalCachedConnections() > cacheMinLimit) && (l2 - l1 > cacheInactivityTimeout * 1000)) { closeAndRemovePooledConnection(paramOraclePooledConnection); } }

In oracle 6, when the connection is inactive for more than the value in getLastAccessedTime , the connections are removed from the pool. However, in oracle8 this class(OracleImplicitConnectionCache) is removed . We found no reference to any method or class which does this auto removal of inactive sessions .

Comments
Post Details
Added on Feb 17 2023
5 comments
895 views