(no commit message)
[utils] / test / enterprise / src / main / java / org / wamblee / test / transactions / SimpleUserTransaction.java
index ffa8925a34ef0f9479b18636c8c2b43b8b86d033..99f7a6f91785a81c5bc3814bcea375a634676ae7 100644 (file)
@@ -64,8 +64,9 @@ public class SimpleUserTransaction implements UserTransaction {
     @Override
     public void rollback() throws IllegalStateException, SecurityException,
         SystemException {
-        if ( status == Status.STATUS_NO_TRANSACTION) { 
-            throw new IllegalStateException("Rollback while not in a transaction");
+        if (status == Status.STATUS_NO_TRANSACTION) {
+            throw new IllegalStateException(
+                "Rollback while not in a transaction");
         }
         try {
             for (int i = 0; i < resources.length; i++) {
@@ -98,11 +99,11 @@ public class SimpleUserTransaction implements UserTransaction {
                         resources[i].rollback(txStates[i]);
                     }
                 } catch (Exception e) {
-                    committing = false; 
+                    committing = false;
                 }
             }
-            
-            if (!committing) { 
+
+            if (!committing) {
                 throw new HeuristicMixedException("Commit failed");
             }
         } finally {
@@ -118,8 +119,9 @@ public class SimpleUserTransaction implements UserTransaction {
 
     @Override
     public void setRollbackOnly() throws IllegalStateException, SystemException {
-        if ( status == Status.STATUS_NO_TRANSACTION) { 
-            throw new IllegalStateException("setRollbackOnly() while not in a transaction");
+        if (status == Status.STATUS_NO_TRANSACTION) {
+            throw new IllegalStateException(
+                "setRollbackOnly() while not in a transaction");
         }
         status = Status.STATUS_MARKED_ROLLBACK;
     }