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 188.8.131.52.0 and later
Information in this document applies to any platform.
Retested uisng JDK 1.7 with JDBC 184.108.40.206 ( ojdbc7.jar), UCP 220.127.116.11 (ucp.jar), ONS 18.104.22.168 ( ons.jar) connecting to a 2 node RAC version 22.214.171.124
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