Merge pull request #449 from nitincchauhan/dev

final
pull/451/merge
Brett Wooldridge 9 years ago
commit ba4b600db0

@ -144,9 +144,9 @@ public abstract class ProxyConnection implements Connection
/** {@inheritDoc} */ /** {@inheritDoc} */
final SQLException checkException(final SQLException sqle) final SQLException checkException(final SQLException sqle)
{ {
String sqlState = sqle.getSQLState(); final String sqlState = sqle.getSQLState();
if (sqlState != null) { if (sqlState != null) {
boolean isForceClose = sqlState.startsWith("08") || SQL_ERRORS.contains(sqlState); final boolean isForceClose = sqlState.startsWith("08") || SQL_ERRORS.contains(sqlState);
if (isForceClose && delegate != ClosedConnection.CLOSED_CONNECTION) { if (isForceClose && delegate != ClosedConnection.CLOSED_CONNECTION) {
LOGGER.warn("{} - Connection {} marked as broken because of SQLSTATE({}), ErrorCode({})", LOGGER.warn("{} - Connection {} marked as broken because of SQLSTATE({}), ErrorCode({})",
poolEntry.getPoolName(), delegate, sqlState, sqle.getErrorCode(), sqle); poolEntry.getPoolName(), delegate, sqlState, sqle.getErrorCode(), sqle);
@ -155,7 +155,7 @@ public abstract class ProxyConnection implements Connection
poolEntry.evict("(connection broken)"); poolEntry.evict("(connection broken)");
} }
else { else {
SQLException nse = sqle.getNextException(); final SQLException nse = sqle.getNextException();
if (nse != null && nse != sqle) { if (nse != null && nse != sqle) {
checkException(nse); checkException(nse);
} }

Loading…
Cancel
Save