Fix #175 add additional SQLFeatureNotSupportedException detection for misbehaved MariaDB driver

pull/192/head
Brett Wooldridge 10 years ago
parent 37e24d630a
commit 1d0879c0ee

@ -295,11 +295,16 @@ public final class PoolUtilities
return 0;
}
try {
final int networkTimeout = connection.getNetworkTimeout();
connection.setNetworkTimeout(executor, (int) timeoutMs);
return networkTimeout;
}
catch (SQLFeatureNotSupportedException e) {
IS_JDBC41 = false;
return 0;
}
}
/**
* Set the loginTimeout on the specified DataSource.

@ -268,11 +268,16 @@ public final class PoolUtilities
return 0;
}
try {
final int networkTimeout = connection.getNetworkTimeout();
connection.setNetworkTimeout(executor, (int) timeoutMs);
return networkTimeout;
}
catch (SQLFeatureNotSupportedException e) {
IS_JDBC41 = false;
return 0;
}
}
/**
* Set the loginTimeout on the specified DataSource.

Loading…
Cancel
Save