CONNECTION_FAILOVER Property

CONNECTION_FAILOVER is a boolean-valued connection property you can use when SAP jConnect uses JNDI to get connection information.

If CONNECTION_FAILOVER is true (the default), SAP jConnect makes multiple attempts to connect to a server. If one attempt to connect to a host and port number associated with a server fails, SAP jConnect uses JNDI to get the next host and port number associated with the server and attempts to connect through them. Connection attempts proceed sequentially through all the hosts and ports associated with a server.

For example, if a database server is associated with these hosts and port numbers, as in the earlier LDAP example:
1.3.6.1.4.1.897.4.2.5:TCP#1#giotto 1266
1.3.6.1.4.1.897.4.2.5:TCP#1#giotto 1337
1.3.6.1.4.1.897.4.2.5:TCP#1#standby 4444

To get a connection to the server, SAP jConnect tries to connect to the host “giotto” at port 1266. If this fails, SAP jConnect tries port 1337 on “giotto.” If this fails, SAP jConnect tries to connect to host “standby1” through port 4444.

If CONNECTION_FAILOVER is false, SAP jConnect attempts to connect to an initial host and port number. If the attempt fails, SAP jConnect throws a SQL exception and does not try again.