HA-Related JDBC Configuration
- JDK 1.5 or higher
- CUBRID 2008 R2.0 or higher
- CUBRID JDBC Driver 2008 R2.0 or higher
<url> := jdbc:CUBRID:<host>:<dbname>:<username>:<password> [?<properties>]
<properties> := <property> [&<property>]
<property> := ... | althosts=<alternative_hosts> | rctime=<time>
<alternative_hosts> := <host>:<port> [,<host>:<port>]
<host> := HOSTNAME | IP_ADDR
<time> := SECOND
To use the HA feature in JDBC, add the following keywords to the existing JDBC connection method.
- althosts : Specifies the information of a broker to connect subsequently (failover) if the connection to the default broker fails. Multiple brokers to failover can be specified, and a connection is attempted according to the order listed by alhosts.
- rctime : The interval for attempting failback to the broker where a failure occurs. This value is used when a failover is performed to the standby broker due to the failure in the active broker. After a failure occurs, the system connects to the broker specified by althosts (failover), end the transaction and then attempts to connect to the existing active broker at every rctime (failback). If rctime is not specified, it is configured to 600 seconds.
In the following example, if a failure occurs in Broker_b1 (default broker), the system attempts to make a connection to Broker_b2 and then to Broker_b3. If the failover is performed to the broker, the system attempts failback at every 600 seconds.