My Oracle Support Banner

How to Close ONS Connections that are Acquired When Using Fast Connection Failover ( FCF) (Doc ID 1599908.1)

Last updated on AUGUST 09, 2023

Applies to:

Universal Connection Pool - Version 11.2.0.3.0 and later
Information in this document applies to any platform.
Retested uisng JDK 1.7 with JDBC 12.1.0.2 ( ojdbc7.jar), UCP 12.1.0.2 (ucp.jar), ONS 11.2.0.4 ( ons.jar) connecting to a 2 node RAC version 11.2.0.4

Goal

 When using FCF (Fast Connection Failover), you will need to register your UCP (Universal Connection Pool) connection pool with ONS (Oracle Notification Services).

Namely, the registration with ONS is configured using:  poolDataSource.setONSConfiguration(...).

The ONS connections to the RAC nodes are acquired when the UCP instance is created:  UniversalConnectionPoolManager.createConnectionPool( poolDataSource) and will remain open for the duration of the Java program unless the UCP instance is destroyed.

There are situations where a java program may need to continue running after a UCP instance is needed.  Closing all the JDBC connections and leaving the UCP instance running may not be an option is ONS connections accumulate.

The goal of this article is to emphasize the usefulness of the UniversalConnectionPoolManager.destroyConnectionPool(...) to ensure that the UCP instance is destroyed and the ONS connections closed.

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
References


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