My Oracle Support Banner

Fast Connection Failover (FCF) Test Client Using the JDBC Driver version 11.1 and a RAC Cluster version 11.1 (Doc ID 566573.1)

Last updated on OCTOBER 13, 2023

Applies to:

Universal Connection Pool - Version 11.2.0.3.0 and later
Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Goal

The following how-to demonstrates a simple java client that shows how to use and verify the Implicit Connection Cache with Fast Connection Failover (FCF) against an 11g RAC cluster. It does this through a java demo as well as various debug techniques used to ensure a correct setup exists. Finally we run through some graceful shutdown procedures to ensure that once a instance leaves the cluster the program continues to run.

Starting from Oracle Database 11g Release 2 (11.2), implicit connection pool has been deprecated, and replaced with Universal Connection Pool (UCP) for JDBC. Oracle recommends that you take advantage of the new architecture, which is more powerful and offers better performance.

For JDBC version 11.2 and for JDBC 12c do not use this document.  Instead use:  Doc ID: 1064652.1 How to Verify Universal Connection Pool (UCP) / Fast Connection Failover (FCF) Setup.

Notes:
- If you are using a 10.2.0.x RAC cluster this same code and the same 11g (11.1.0.6) JDBC driver can be used here as well. Here, a 11g RAC cluster and the 11g (11.1.0.6) JDBC driver with JDK 1.5 are used.
- If using JDBC 11.2, the following warning message can be seen during compilation:

Warning: [deprecation] oracle.jdbc.pool.OracleConnectionCacheManager in oracle.jdbc.pool has been deprecated

Even though you can still use Implicit Connection Cache with JDBC 11.2, it has been deprecated and will be removed in the future. In version 11.2 and up the FCF is now configured through FCF.
Refer to the following links for more information :

Universal Connection Pool Developer's Guide
19c
9.2 About Fast Connection Failover

Solution

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
Goal
Solution
 Testing Database Server Setup via SQL*Plus
 Setting Up The Client Environment
 Troubleshooting Issues Regarding Establishing a Connection
 Coding recommendations for FCF
 More Information
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.