geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r279468 - in /geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction: context/InheritableTransactionContext.java manager/TransactionImpl.java
Date Wed, 07 Sep 2005 23:56:04 GMT
Author: djencks
Date: Wed Sep  7 16:56:01 2005
New Revision: 279468

URL: http://svn.apache.org/viewcvs?rev=279468&view=rev
Log:
If end fails, mark the transaction rollback only.  Improve error message slightly

Modified:
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/InheritableTransactionContext.java
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/InheritableTransactionContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/InheritableTransactionContext.java?rev=279468&r1=279467&r2=279468&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/InheritableTransactionContext.java
(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/InheritableTransactionContext.java
Wed Sep  7 16:56:01 2005
@@ -96,8 +96,11 @@
         if (transaction == null) {
             throw new IllegalStateException("There is no transaction in progress.");
         }
-
-        return transaction.delistResource(xaResource, flag);
+        boolean success = transaction.delistResource(xaResource, flag);
+        if (!success) {
+            transaction.setRollbackOnly();
+        }
+        return success;
     }
 
     public void registerSynchronization(Synchronization synchronization) throws RollbackException,
SystemException {

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=279468&r1=279467&r2=279468&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Wed Sep  7 16:56:01 2005
@@ -212,7 +212,7 @@
             }
             return true;
         } catch (XAException e) {
-            log.warn("Unable to delist XAResource " + xaRes, e);
+            log.warn("Unable to delist XAResource " + xaRes + ", error code: " + e.errorCode,
e);
             return false;
         }
     }



Mime
View raw message