commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Lissa (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DBUTILS-138) Exception in closing statement leave connections open
Date Thu, 03 May 2018 18:16:00 GMT
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)

Mime
View raw message