February 2000
Intermediate to advanced
720 pages
15h 26m
English
The LDAPConnection.connect methods can take more than just a host name or IP address for the host name parameter. The parameter can be a space-delimited list of hosts, with an optional colon and port number for each—for example:
String hosts =
"directory.knowledge.com:1050 people.catalog.com 199.254.1.2";
ld.connect( hosts, 20000 );
In this example, three alternative hosts are specified. The first one also has the port number identified; the second and third ones will use the port number passed as the second parameter to the method: 20000. The SDK will attempt to connect to the first host in the list. If that fails, it will try the second one, and so on.
You can tune the connection policy with LDAPConnection.setConnSetupDelay ...
Read now
Unlock full access