Only One ONS Registration Is Effective When Calling setONSConfiguration() Method
Last updated on AUGUST 03, 2016
Applies to:JDBC - Version 10.2.0 and later
Information in this document applies to any platform.
An application is using 10.2.0.3 JDBC FCF (fast connection failover) against two RAC clusters. Each RAC cluster is composed of two nodes. For each RAC cluster, an implicit connection cache has been created. Also, for each RAC cluster, the related ONS nodes configuration is registered via the setONSConfiguration() method.
To illustrate this, here is the related sequence of code :
// ons configuration registration for rac cluster 1:
OracleDataSource rac1_ds = new OracleDataSource();
// ons configuration registration for rac cluster 2:
OracleDataSource rac2_ds = new OracleDataSource();
The problem is that only the first ONS registration is taken into account by the Oracle JDBC driver. Only the first ONS configuration (ons_rac1_conf="nodes=node1:6201,node2:6201"; ) will be effectively registered.
This can be verified (you might use the netstat command) by checking the different TCP connections to the RAC cluster nodes: only TCP connections to node1/port 6201 and node2/port 6201 are established.
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