geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1097971 - in /geronimo/components/txmanager/trunk: ./ geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/
Date Fri, 29 Apr 2011 22:12:41 GMT
Author: dblevins
Date: Fri Apr 29 22:12:41 2011
New Revision: 1097971

URL: http://svn.apache.org/viewvc?rev=1097971&view=rev
Log:
svn merge -r 1097554:1097555 https://svn.apache.org/repos/asf/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2

http://svn.apache.org/viewvc?view=revision&revision=1097555
------------------------------------------------------------------------
r1097555 | dblevins | 2011-04-28 10:22:05 -0700 (Thu, 28 Apr 2011) | 3 lines

GERONIMO-4576 and OPENEJB-782
Record the orgigin of setRollbackOnly calls

------------------------------------------------------------------------

Added:
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/SetRollbackOnlyException.java
      - copied unchanged from r1097555, geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/SetRollbackOnlyException.java
Modified:
    geronimo/components/txmanager/trunk/   (props changed)
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/
  (props changed)
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java

Propchange: geronimo/components/txmanager/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 29 22:12:41 2011
@@ -1,4 +1,4 @@
 /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1:780438-803185,984259,984262,984273
 /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1:981270
-/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2:1023970
+/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2:1023970,1097555
 /geronimo/sandbox/djencks/txmanager:1058803,1073479

Propchange: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 29 22:12:41 2011
@@ -1,4 +1,4 @@
 /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound:780438-803185,984259,984262,984273
 /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound:981270
-/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound:1023970
+/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.2/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound:1023970,1097555
 /geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound:1058785,1058792,1058803,1073479

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=1097971&r1=1097970&r2=1097971&view=diff
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Fri Apr 29 22:12:41 2011
@@ -123,10 +123,15 @@ public class TransactionImpl implements 
     }
 
     public synchronized void setRollbackOnly() throws IllegalStateException {
+        setRollbackOnly(new SetRollbackOnlyException());
+    }
+
+    public synchronized void setRollbackOnly(Exception reason) {
         switch (status) {
             case Status.STATUS_ACTIVE:
             case Status.STATUS_PREPARING:
                 status = Status.STATUS_MARKED_ROLLBACK;
+                markRollbackCause(reason);
                 break;
             case Status.STATUS_MARKED_ROLLBACK:
             case Status.STATUS_ROLLING_BACK:
@@ -209,7 +214,7 @@ public class TransactionImpl implements 
         } catch (XAException e) {
             log.warn("Unable to enlist XAResource " + xaRes + ", errorCode: " + e.errorCode,
e);
             // mark status as rollback only because enlist resource failed
-            setRollbackOnly();
+            setRollbackOnly(e);
             return false;
         }
     }



Mime
View raw message