|
|
@ -1482,7 +1482,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat |
|
|
|
try { |
|
|
|
try { |
|
|
|
poolableConnection = getConnectionInternal(maxWaitMillis); |
|
|
|
poolableConnection = getConnectionInternal(maxWaitMillis); |
|
|
|
} catch (GetConnectionTimeoutException ex) { |
|
|
|
} catch (GetConnectionTimeoutException ex) { |
|
|
|
if (notFullTimeoutRetryCnt <= this.notFullTimeoutRetryCount && !isFull()) { |
|
|
|
if (notFullTimeoutRetryCnt < this.notFullTimeoutRetryCount && !isFull()) { |
|
|
|
notFullTimeoutRetryCnt++; |
|
|
|
notFullTimeoutRetryCnt++; |
|
|
|
if (LOG.isWarnEnabled()) { |
|
|
|
if (LOG.isWarnEnabled()) { |
|
|
|
LOG.warn("get connection timeout retry : " + notFullTimeoutRetryCnt); |
|
|
|
LOG.warn("get connection timeout retry : " + notFullTimeoutRetryCnt); |
|
|
@ -1830,7 +1830,11 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat |
|
|
|
String errorMessage = buf.toString(); |
|
|
|
String errorMessage = buf.toString(); |
|
|
|
|
|
|
|
|
|
|
|
if (createError != null) { |
|
|
|
if (createError != null) { |
|
|
|
|
|
|
|
if (createError instanceof SQLException) { |
|
|
|
|
|
|
|
throw (SQLException)createError; |
|
|
|
|
|
|
|
} else { |
|
|
|
throw new GetConnectionTimeoutException(errorMessage, createError); |
|
|
|
throw new GetConnectionTimeoutException(errorMessage, createError); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new GetConnectionTimeoutException(errorMessage); |
|
|
|
throw new GetConnectionTimeoutException(errorMessage); |
|
|
|
} |
|
|
|
} |
|
|
|