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

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

Loading…
Cancel
Save