Configuring FAN for Specific Drivers and Pools

Specific requirements and recommendations for configuring FAN with various database client drivers.

JDBC FAN Requirements

Oracle Universal Connection Pool (UCP)

<dependencies>

...
<dependency>
  <groupId>com.oracle.database.ha</groupId>
  <artifactId>ons</artifactId>
  <version>${oracle.jdbc.version}</version>
</dependency>
<dependency>
  <groupId>com.oracle.database.ha</groupId>
  <artifactId>simplefan</artifactId>
  <version>${oracle.jdbc.version}</version>
</dependency>

...
</dependencies>

Non-Oracle Connection Pools or Standalone JDBC Applications

For clients not using UCP, but using third-party connection pools or standalone JDBC you typically need to do the following:

OCI-Based Applications

ODP.NET FAN Requirements

All ODP.NET provider types (core, managed, and unmanaged) support FAN.

ODP.NET out-of-band FAN requires connection pooling and HA Events to be enabled, which they are by default. No code changes are necessary if these attributes are not changed.

The following is an example of a FAN-enabled ODP.NET connection string:

"user id=oracle; password=oracle; data source=HA; pooling=true; HA events=true;"

In-band FAN is enabled by default.

Read more about ODP.NET high availability in Real Application Clusters and Global Data Services.

JBoss

Use ONS FAN (recommended) if possible, because it also covers unplanned outages. If ONS FAN fails, in-band is used instead. Both can also work at the same time.

For testing - update data source definition in standalone/domain configuration XML

For production - use JBoss management console or CLI commands to update DS definition

JBoss configuration settings

Follow up with Redhat documentation for draining configuration: https://access.redhat.com/solutions/42463

Also, see Redhat documentation for connection validation: https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/7.4/html/configuration_guide/datasource_management#configure_database_connection_validation_settings

To specify additional JDBC driver connection properties:

<connection-property name="URL">
    jdbc:oracle:thin:@CURRENT_URL?TNS_ADMIN=/absolute_path/ojdbc.properties
</connection-property>

In /absolute_path/ojdbc.properties, include the following connection properties and values:

prop1=value1
prop2=value2
…

Other Pools and Drivers