You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Stefano Lissa (JIRA)" <ji...@apache.org> on 2018/05/03 18:16:00 UTC
[jira] [Created] (DBUTILS-138) Exception in closing statement leave
connections open
Stefano Lissa created DBUTILS-138:
-------------------------------------
Summary: Exception in closing statement leave connections open
Key: DBUTILS-138
URL: https://issues.apache.org/jira/browse/DBUTILS-138
Project: Commons DbUtils
Issue Type: Bug
Affects Versions: 1.7
Environment: SQL Server 2012, Java 8, MS JDBC Driver 4.
Reporter: Stefano Lissa
On class QueryRunner starting at line 393 (see the snippet below) if the statement close attempt results in an exception, the connection is not closed correctly. I was not able to intercept the exception since it happens in a production environment with SQL Server 2012, Java 8 and original MS drivers, but the effect is the connection pool fills up and finally starts to log abandoned connections opened by QueryRunner.
{noformat}
} finally {
try {
close(rs);
} finally {
close(stmt);
if (closeConn) {
close(conn);
}
}
}{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)