summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgidijus Vaishnora2011-02-22 16:03:31 (EST)
committerEgidijus Vaishnora2011-02-22 16:03:31 (EST)
commit969a029246a075fc27744d14298a6577935b5d72 (patch)
treead7acf11aa91c4b00262cc1d815ea6f2b44365fc
parent65e4365c34dbb2c48c3a36cee1768ba16756b570 (diff)
downloadcdo-969a029246a075fc27744d14298a6577935b5d72.zip
cdo-969a029246a075fc27744d14298a6577935b5d72.tar.gz
cdo-969a029246a075fc27744d14298a6577935b5d72.tar.bz2
[336932] bug fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=336932
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index d0830bc..caccac1 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -180,6 +180,7 @@ public final class DBUtil
{
try
{
+ rollback(connection);
connection.close();
}
catch (Exception ex)
@@ -192,6 +193,18 @@ public final class DBUtil
return null;
}
+ private static void rollback(Connection connection)
+ {
+ try
+ {
+ connection.rollback();
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ }
+ }
+
public static Exception close(Statement statement)
{
if (statement != null)