--- /Sources/Workspace/EditAnywhere-NG1/jackrabbit/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java 2011-11-15 12:36:11.000000000 +0100 +++ /Sources/Workspace/EditAnywhere-NG1/jackrabbit/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl-Fixed.java 2011-11-15 12:35:57.000000000 +0100 @@ -321,12 +321,14 @@ if (tx == null) { throw new XAException(XAException.XAER_NOTA); } - if (onePhase) { - tx.prepare(); + try { + if (onePhase) { + tx.prepare(); + } + tx.commit(); + } finally { + txGlobal.remove(xid); } - tx.commit(); - - txGlobal.remove(xid); } /** @@ -337,9 +339,11 @@ if (tx == null) { throw new XAException(XAException.XAER_NOTA); } - tx.rollback(); - - txGlobal.remove(xid); + try { + tx.rollback(); + } finally { + txGlobal.remove(xid); + } } /**