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 a broker (primary_broker). The attributes specified for CUBRID HA include althosts which is the information of more than one broker node to be connected when a failure occurs and rctime which is the reconnection interval after the recovery of a failed broker. 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:demodb:::?charset=utf-8&althosts=secondary_broker:33000&rctime=30", "dba", "");