mirror of https://github.com/apache/openjpa.git
OPENJPA-543
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@640511 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2d0a3c9157
commit
9dadffffc1
|
@ -230,15 +230,25 @@ public class SQLStoreQuery
|
|||
if (stmnt != null)
|
||||
buf.setParameters(stmnt);
|
||||
|
||||
int count = executeUpdate(store, conn, stmnt, buf);
|
||||
int count = executeUpdate(store, conn, stmnt, buf);
|
||||
|
||||
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 {
|
||||
try { conn.close(); } catch (SQLException se) {}
|
||||
if (stmnt != null) {
|
||||
try {
|
||||
stmnt.close();
|
||||
} catch (SQLException se) {
|
||||
// safe to ignore
|
||||
} finally {
|
||||
stmnt = null;
|
||||
}
|
||||
}
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException se) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue