Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



JDBC Configuration

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", "");