[jboss-svn-commits] JBL Code SVN: r23839 - in labs/jbosstm/trunk/XTS: WS-T/dev/src11/com/arjuna/wst11/messaging/engines and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Nov 12 12:21:46 EST 2008


Author: adinn
Date: 2008-11-12 12:21:46 -0500 (Wed, 12 Nov 2008)
New Revision: 23839

Modified:
   labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
   labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/ParticipantRecord.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/FailureBusinessParticipant.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java
   labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java
Log:
fixed error discovered by tests in ParticipantRecord, corrected MultiCancel/Compensate tests which were expecting failures which did not arise, corrected SuspendCommitTransaction test to reflect changed model for hwo to generate errors when not in a transaction and modified timer code in BA engines and in AT participant engine to fix  a race condition. still need to deal with propagating failures when a transaction is repeatedly rerun by the recovery thread - all fixes for JBTM-404

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -638,11 +638,17 @@
      * 
      * Completed -> Completed (resend Completed)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
         
@@ -941,7 +947,7 @@
             // restore previous state so we can retry the close otherwise we get stuck in state closing forever
             changeState(State.STATE_COMPLETED);
 
-            sendCompleted();
+            initiateTimer();
             return ;
         }
         // delete any log record for the participant
@@ -958,7 +964,7 @@
 
                 changeState(State.STATE_COMPLETED);
 
-                sendCompleted();
+                initiateTimer();
 
                 return;
             }
@@ -1160,7 +1166,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -353,8 +353,7 @@
         }
         else if ((current == State.STATE_CANCELING) || (current == State.STATE_COMPENSATING))
         {
-            sendFaulted() ;
-            ended() ;
+            executeFault() ;
         }
         else if (current == State.STATE_ENDED)
         {

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -574,11 +574,17 @@
      * 
      * Completed -> Completed (resend Completed)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
         
@@ -859,8 +865,7 @@
             }
             // restore previous state so we can retry the close otherwise we get stuck in state closing forever
             changeState(State.STATE_COMPLETED);
-
-            sendCompleted();
+            initiateTimer();
             return ;
         }
         // delete any log record for the participant
@@ -877,7 +882,7 @@
 
                 changeState(State.STATE_COMPLETED);
 
-                sendCompleted();
+                initiateTimer();
 
                 return;
             }
@@ -903,7 +908,7 @@
         {
             if (WSTLogger.arjLoggerI18N.isWarnEnabled())
             {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_2", new Object[] {id}, fe);
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_1", new Object[] {id}, fe);
             }
             // fault here because the participant doesn't want to retry the compensate            
             fault() ;
@@ -927,7 +932,7 @@
             
             if (WSTLogger.arjLoggerI18N.isDebugEnabled())
             {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_2", new Object[] {id}, th) ;
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_", new Object[] {id}, th) ;
             }
             return ;
         }
@@ -990,7 +995,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src10/com/arjuna/wst/messaging/engines/ParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -543,11 +543,17 @@
      * 
      * PreparedSuccess -> PreparedSuccess (resend Prepared)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
         
@@ -801,7 +807,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -740,11 +740,17 @@
      *
      * Completed -> Completed (resend Completed)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
 
@@ -1074,7 +1080,7 @@
             // restore previous state so we can retry the close otherwise we get stuck in state closing forever
             changeState(State.STATE_COMPLETED);
 
-            sendCompleted();
+            initiateTimer();
             return ;
         }
         // delete any log record for the participant
@@ -1091,7 +1097,7 @@
 
                 changeState(State.STATE_COMPLETED);
 
-                sendCompleted();
+                initiateTimer();
 
                 return;
             }
@@ -1292,7 +1298,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -342,8 +342,7 @@
         }
         else if ((current == State.STATE_CANCELING) || (current == State.STATE_COMPENSATING))
         {
-            sendFailed() ;
-            ended() ;
+            executeFail(fail.getExceptionIdentifier()) ;
         }
         else if (current == State.STATE_ENDED)
         {

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -649,11 +649,17 @@
      *
      * Completed -> Completed (resend Completed)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
 
@@ -967,7 +973,7 @@
             // restore previous state so we can retry the close otherwise we get stuck in state closing forever
             changeState(State.STATE_COMPLETED);
 
-            sendCompleted();
+            initiateTimer();
             return ;
         }
         // delete any log record for the participant
@@ -984,7 +990,7 @@
 
                 changeState(State.STATE_COMPLETED);
 
-                sendCompleted();
+                initiateTimer();
 
                 return;
             }
@@ -1096,7 +1102,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -533,11 +533,17 @@
      *
      * PreparedSuccess -> PreparedSuccess (resend Prepared)
      */
-    private void commsTimeout()
+    private void commsTimeout(TimerTask caller)
     {
         final State current ;
         synchronized(this)
         {
+            if (timerTask != caller) {
+                // the timer was cancelled but it went off before it could be cancelled
+
+                return;
+            }
+
             current = state ;
         }
 
@@ -769,7 +775,7 @@
         {
             timerTask = new TimerTask() {
                 public void run() {
-                    commsTimeout() ;
+                    commsTimeout(this) ;
                 }
             } ;
             TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;

Modified: labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/ParticipantRecord.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/ParticipantRecord.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/ParticipantRecord.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -838,7 +838,7 @@
     public final boolean isParticipantCompletion ()
     {
         // n.b. this is ok if _resourceHandle is null
-        return (_resourceHandle instanceof ParticipantWithComplete);
+        return !(_resourceHandle instanceof ParticipantWithComplete);
     }
 
 	/*

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/FailureBusinessParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/FailureBusinessParticipant.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/FailureBusinessParticipant.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -63,28 +63,29 @@
     {
 	System.out.println("FailureBusinessParticipant.close for "+this);
 
-	if (_failurePoint == FAIL_IN_CLOSE)
-	    throw new WrongStateException();
+	if (_failurePoint == FAIL_IN_CLOSE) {
+        throw new WrongStateException();
+    }
 	
 	_passed = true;
     }
 
-    public void cancel () throws WrongStateException, SystemException
+    public void cancel () throws WrongStateException, SystemException, FaultedException
     {
 	System.out.println("FailureBusinessParticipant.cancel for "+this);
 
 	if (_failurePoint == FAIL_IN_CANCEL)
-	    throw new WrongStateException();
+	    throw new FaultedException();
 	
 	_passed = true;
     }
 
-    public void compensate () throws WrongStateException, SystemException
+    public void compensate () throws WrongStateException, SystemException, FaultedException
     {
 	System.out.println("FailureBusinessParticipant.compensate for "+this);
 
 	if (_failurePoint == FAIL_IN_COMPENSATE)
-	    throw new WrongStateException();
+	    throw new FaultedException();
 	
 	_passed = true;
     }

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -57,8 +57,7 @@
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Exit.class));
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCancel.class));
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiClose.class));
-        // this test fails because the compensate is retried forever instead of an exception being generated
-        //addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
+        addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
 
         // wstx basic tests
         // these don't run at present because the WSCF protocol manager code cannot process the xml

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -71,19 +71,8 @@
             }
             throw eouter;
         }
-	    try {
+        // the close should succeed even though the participant fails
 	    uba.close();
-        } catch (SystemException ex) {
-            // we should get here
-            assertTrue(p.passed());
-            return;
-        } catch (Exception eouter) {
-            try {
-                uba.cancel();
-            } catch(Exception einner) {
-            }
-            throw eouter;
-        }
-        fail("expected SystemError");
+        assertTrue(p.passed());
     }
 }

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -70,18 +70,8 @@
             }
             throw eouter;
         }
-	    try {
+        // the cancel/compensate should succeed even though the participant fails to compensate
 	    uba.cancel();
-        } catch (SystemException ex) {
-            // we should get here
-            assertTrue(p.passed());
-        } catch (Exception eouter) {
-            try {
-                uba.cancel();
-            } catch(Exception einner) {
-            }
-            throw eouter;
-        }
-        fail("expected SystemError");
+        assertTrue(p.passed());
 	}
 }

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -35,6 +35,7 @@
 import com.arjuna.mw.wst.TxContext;
 import com.arjuna.mw.wst.UserTransaction;
 import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
 import junit.framework.TestCase;
 
 /**
@@ -69,7 +70,7 @@
     try {
 	    ut.commit();
 	}
-	catch (UnknownTransactionException ex)
+	catch (WrongStateException ex)
 	{
 	    // we should arrive here
 	}

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -57,8 +57,7 @@
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Exit.class));
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCancel.class));
         addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiClose.class));
-        // this test fails because the compensate is retried forever instead of an exception being generated
-        //addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
+        addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
 
         // wstx basic tests
         // these don't run at present because the WSCF protocol manager code cannot process the xml

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -71,19 +71,8 @@
             }
             throw eouter;
         }
-	    try {
+        // the close should succeed even though the participant fails
 	    uba.close();
-        } catch (SystemException ex) {
-            // we should get here
-            assertTrue(p.passed());
-            return;
-        } catch (Exception eouter) {
-            try {
-                uba.cancel();
-            } catch(Exception einner) {
-            }
-            throw eouter;
-        }
         fail("expected SystemError");
     }
 }
\ No newline at end of file

Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java	2008-11-12 16:24:11 UTC (rev 23838)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java	2008-11-12 17:21:46 UTC (rev 23839)
@@ -70,18 +70,8 @@
             }
             throw eouter;
         }
-	    try {
+        // the cancel/compensate should succeed even though the participant fails to compensate
 	    uba.cancel();
-        } catch (SystemException ex) {
-            // we should get here
-            assertTrue(p.passed());
-        } catch (Exception eouter) {
-            try {
-                uba.cancel();
-            } catch(Exception einner) {
-            }
-            throw eouter;
-        }
-        fail("expected SystemError");
+        assertTrue(p.passed());
 	}
 }
\ No newline at end of file




More information about the jboss-svn-commits mailing list