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!

Universal Connection Pool - Thread interrupt status

user11995089Oct 6 2022

Issue:
We found following two issues related to oracle driver in our application:
1. Thread interrupt status changes after getting a connection from the connection pool using UCP,
2. On any open connection, if thread is interrupted and the same connection is used to execute any query, following exceptions are thrown depending on where the thread was interrupted:
i) -SQLException ErrorCode = 29
java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Universal Connection Pool is about to
shutdown: low chance to get a connection

ii) SQLException ErrorCode = 17008
java.sql.SQLRecoverableException: Closed Connection

The above two issues are found after application migrated from JDK6, Oracle 11g to JDK11(Redhat java-11-openjdk-11.0.4.11-2.el8.x86_64.rpm), Oracle 19c.
Driver version used before migration is ojdbc16 11.2.0.4. While in current application, we use ojdbc8 19.8.0.0 and ucp 19.8.0.0.
Unlike current version, in older version, the interrupt status remains unchanged after getting connection from the connection pool.

Oracle SR initially suspected the issue to be 'ORA-00904: "DBMS_SERVICE_PRVT"."GET_TOPOLOGY": invalid identifier calls from UCP' and instructed us to apply UCP Patch 28643583. But the patch did not fix our issue. We have also tested the application using the latest 21.6 ojdbc and ucp driver which did not help either.

We had also prepared a demo application so that oracle SR can replicate the issue on their side and help us achieve the expected behaviour.
After testing they suggested us to change the initial pool size property ('setInitialPoolSize(0)') and add the JVM flag '-Doracle.jdbc.javaNetNio=false' (Referring to Oracle Document 2552022.1)

Comments
Post Details
Added on Oct 6 2022
0 comments
1,057 views