log.debug(this + " got " + e + ": " + e.getMessage());
if (retryCount < numberOfCallRetries - 1)
{
continue;
}
throw new CannotConnectException(
"Can not get connection to server. Problem establishing " +
"socket connection for " + locator, e);
}
catch (IOException e)
{
semaphore.release();
if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
log.debug(this + " got " + e + ": " + e.getMessage());
if (retryCount < numberOfCallRetries - 1 && isGeneralizeSocketException()
&& e.getMessage() != null && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
{
continue;
}
throw new CannotConnectException(
"Can not get connection to server. Problem establishing " +
"socket connection for " + locator, e);
}
catch (Exception e)
{
// if (bailOut)
// return null;
semaphore.release();
if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
if (e instanceof InterruptedException && isWrapInterruptedException())
throw new RuntimeException(e);
throw new CannotConnectException(
"Can not get connection to server. Problem establishing " +
"socket connection for " + locator, e);
}
if (tempTimeout >= 0)