How to Close ONS Connections that are Acquired When Using Fast Connection Failover ( FCF)
Last updated on MAY 19, 2017
Applies to:Universal Connection Pool - Version 126.96.36.199.0 and later
Information in this document applies to any platform.
Retested uisng JDK 1.7 with JDBC 188.8.131.52 ( ojdbc7.jar), UCP 184.108.40.206 (ucp.jar), ONS 220.127.116.11 ( ons.jar) connecting to a 2 node RAC version 18.104.22.168
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.
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