Connections to the servers of a high-availability cluster

Using the JDBC driver, Java™ applications can connect to HCL OneDB™ database servers in a high-availability cluster. Java applications can also connect to HCL OneDB Connection Managers, which can handle failover for high-availability clusters and redirect connections to cluster servers.

To connect your Java application to the servers of a high-availability cluster, you must set properties in the connection URL or DataSource. If the application performs update operations on secondary servers, configure the application to initially check for read-only server status.

When you configure HCL OneDB Connection Managers to handle connections between your Java application server and high-availability cluster, you get the following benefits:
  • You can direct connection requests to the most appropriate secondary server through rule-based redirection policies.
  • You can manage failover for your high-availability clusters, automatically promoting a secondary server to the role of primary server if the primary server fails.
  • You can prioritize connections between a specific application server and the primary server of your high-availability cluster when you install and configure HCL OneDB Connection Managers on the same hosts as your Java application servers.
  • When database servers are behind a firewall, HCL OneDB Connection Managers can act as proxy servers, and handle client/server communication.

You can use high-availability secondary servers with connection pooling. For more information, see High-Availability Data Replication with connection pooling.

Demonstration programs are available in the hdr directory within the demo directory where HCL OneDB JDBC Driver is installed. For details about the files, see Sample code files.