Attempt to bound how long a connection.close() call can take to 30 seconds on JDBC41 drivers.

2.3.0
Brett Wooldridge 10 years ago
parent a195e7781a
commit 32fa545e0f

@ -41,7 +41,13 @@ public final class PoolUtilities
{
if (connection != null) {
try {
setNetworkTimeout(executorService, connection, TimeUnit.SECONDS.toMillis(30), true);
try {
setNetworkTimeout(executorService, connection, TimeUnit.SECONDS.toMillis(30), true);
}
catch (SQLException e) {
// keep going, close anyway
}
connection.close();
}
catch (Exception e) {

Loading…
Cancel
Save