You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jc...@apache.org on 2013/06/20 16:20:37 UTC
git commit: ISIS-442: fix errorhandling in IsisTransactionManager
Updated Branches:
refs/heads/master b71c4ab11 -> 4ec5d85db
ISIS-442: fix errorhandling in IsisTransactionManager
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/4ec5d85d
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/4ec5d85d
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/4ec5d85d
Branch: refs/heads/master
Commit: 4ec5d85dbbc0ec77abb2dec78c1d5d4ff4922f0d
Parents: b71c4ab
Author: Jeroen van der Wal <je...@stromboli.it>
Authored: Thu Jun 20 16:19:23 2013 +0200
Committer: Jeroen van der Wal <je...@stromboli.it>
Committed: Thu Jun 20 16:19:23 2013 +0200
----------------------------------------------------------------------
.../runtime/system/transaction/IsisTransactionManager.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/4ec5d85d/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransactionManager.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransactionManager.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransactionManager.java
index b85fde7..eafde13 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransactionManager.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransactionManager.java
@@ -369,6 +369,7 @@ public class IsisTransactionManager implements SessionScopedComponent {
} catch(RuntimeException ex) {
// just in case any new exception was raised...
abortCause = ex;
+ transactionLevel = 1; // because the transactionLevel was decremented earlier
}
}
@@ -379,6 +380,7 @@ public class IsisTransactionManager implements SessionScopedComponent {
} catch(RuntimeException ex) {
// just in case any new exception was raised...
abortCause = ex;
+ transactionLevel = 1; // because the transactionLevel was decremented earlier
}
}
@@ -388,6 +390,10 @@ public class IsisTransactionManager implements SessionScopedComponent {
} catch(RuntimeException ex) {
// just in case any new exception was raised...
abortCause = ex;
+
+ // hacky... moving the transaction back to something other than COMMITTED
+ transactionLevel = 1; // because the transactionLevel was decremented earlier
+ getTransaction().setAbortCause(new IsisTransactionManagerException(ex));
}
}
@@ -401,6 +407,8 @@ public class IsisTransactionManager implements SessionScopedComponent {
} catch(RuntimeException ex) {
// just in case any new exception was raised...
abortCause = ex;
+ transactionLevel = 1; // because the transactionLevel was decremented earlier
+ getTransaction().setAbortCause(new IsisTransactionManagerException(ex));
}
throw abortCause;