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 AUGUST 10, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
JDBC - Version 11.1.0.6 and later
Universal Connection Pool - Version 11.2.0.3.0 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 :

Oracle® Universal Connection Pool for JDBC Developer's Guide
11g Release 2 (11.2)
Using Fast Connection Failover

Oracle® Universal Connection Pool for JDBC Developer's Guide
12g Release 1 (12.1)
Using Fast Connection Failover

Oracle® Universal Connection Pool for JDBC Developer's Guide
12g Release 2 (12.2)
About Fast Connection Failover

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms