Tuesday, March 11, 2025

23ai JDBC Driver Does Not Consider RETRY_COUNT and RETRY_DELAY

RETRY_COUNT and RETRY_DELAY are key to setting up JDBC client failover setup. Adjusting these parameters allow connection pool to wait for the duration planned outtage without issuing an error message.
However, 23ai JDBC driver has change in behaviour that by default it ignores these two parameters (3073421.1). Instead connection wait time needs to be set at the UCP using the
setConnectionWaitTimeout
method. So if moving into 23ai driver set Connection Wait Timeout equal to or slightly higher than the total outtage time (which use to be RETRY_COUNT x RETRY_DELAY).
Above may require code changes depending on how UCP pool is used in the application. If old behaviour of using RETRY_COUNT and RETRY_DELAY is perfered then it could be enabled on 23ai JDBC driver by setting the following JVM parameter
-Doracle.ucp.createConnectionInBorrowThread=true
Useful metalink notes
Universal Connection Pool Times Out Prematurely During A Data Guard Switchover Test [ID 3073421.1]

Related Post
JDBC Client Failover in Data Guard Configuration with PDBs