Enabling Connection Failover

You can use the connection string to enable connection failover by setting REQUEST_HA_SESSION to true.

For example:
URL="jdbc:sybase:Tds:server1:port1,server2:port2,...,
serverN:portN/mydb?REQUEST_HA_SESSION=true"

where server1:port1, server2:port2, ... , serverN:portN is the ordered failover list.

jConnect attempts to connect to the first host and port specified in the failover list. If unsuccessful, goes through the list until a connection is established or until the end of the list is reached.

Note: The list of alternate servers specified in the connection string is used only during initial connection. After the connection is established with any available instance, and if the client supports high availability, the client receives an updated list of the best possible failover targets from the server. This new list overrides the specified list.