To use CUBRID HA in JDBC, you must specify the connection information of another broker (secondary_broker) to be connected when a failure occurs in broker (primary_broker). The attribute configured for CUBRID HA is althosts which represents information of more than one 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:primary_broker:33000:testdb:::?charset=utf-8&althosts=secondary_broker:33000", "dba", "");