OPENJPA-543

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@640510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Dick 2008-03-24 18:40:47 +00:00
parent f943c66551
commit 169e1ef586

View File

@ -239,11 +239,18 @@ public class SQLStoreQuery
}
return Numbers.valueOf(count);
} catch (SQLException se) {
if (stmnt != null)
try { stmnt.close(); } catch (SQLException se2) {}
try { conn.close(); } catch (SQLException se2) {}
throw SQLExceptions.getStore(se, dict);
} finally {
if(stmnt != null) {
try {
stmnt.close();
} catch (SQLException se) {
// safe to ignore, we're just cleaning up.
}
finally {
stmnt = null;
}
}
try { conn.close(); } catch (SQLException se) {}
}
}