To use CUBRID HA in JDBC, you must specify the connection information of another broker (nodeB_broker) to be connected when a failure occurs in broker (nodeA_broker). The attribute configured for CUBRID HA is althosts which represents information of one or more broker nodes to be connected. For details, see "API Reference > JDBC API > JDBC Programming > Connection Configuration."
The following example shows how to configure JDBC:
Connection connection =
DriverManager.getConnection("jdbc:CUBRID:nodeA_broker:33000:testdb:::?charSet=utf-8&altHosts=nodeB_broker:33000", "dba", "");