int i = 0;
while (i < connectionRetries) {
long start = System.currentTimeMillis();
try {
this.getLog().info("Attempting to connect ot LDAP directory server (" + host + ":" + port + ")");
connection.connect(host, port, connectionTimeout);
break;
} catch (final LDAPException e) {
final String message = "Could not connect to LDAP directory server (" + host + ":" + port + ")";
this.getLog().error(message, e);
if (i++ < connectionRetries) {