[jboss-svn-commits] JBL Code SVN: r11546 - in labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP: ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator and 10 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue May 1 06:59:57 EDT 2007


Author: jhalliday
Date: 2007-05-01 06:59:57 -0400 (Tue, 01 May 2007)
New Revision: 11546

Added:
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java
Removed:
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java
Modified:
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/build.xml
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/subordinate/TransactionImple.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/DurableTwoPhaseCommitParticipant.java
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/build.xml
   labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/classes/com/arjuna/common/internal/util/logging/DefaultLog.java
Log:
Backported transaction reaper performance fix (JBTM-207), XTS HeaderProcessor QName fix assorted other minor fixes from trunk to the 4.2.3.GA service pack branch.


Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/build.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/build.xml	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/build.xml	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,20 +1,20 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors 
-  as indicated by the @author tags. 
+  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
   See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
   You should have received a copy of the GNU Lesser General Public License,
   v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
+
   (C) 2005-2006,
   @author JBoss Inc.
 -->
@@ -51,10 +51,12 @@
 	<property name="com.hp.mwlabs.ts.arjuna.destroot" location="build"/>
     <property name="com.hp.mwlabs.ts.arjuna.jar.dest" location="lib"/>
 	<property name="com.hp.mwlabs.ts.arjuna.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/classes"/>
-	<property name="com.hp.mwlabs.ts.arjuna.tests.src" location="tests"/>
+	<property name="com.hp.mwlabs.ts.arjuna.tests.src" location="tests/classes"/>
 	<property name="com.hp.mwlabs.ts.arjuna.tests.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/tests"/>
     <property name="com.hp.mwlabs.ts.arjuna.tests.destdir" location="${com.hp.mwlabs.ts.arjuna.jar.dest}/tests/"/>
-    <property name="com.hp.mwlabs.ts.arjuna.services.src" location="services/classes"/>
+	<property name="com.hp.mwlabs.ts.arjuna.reports.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/reports"/>
+
+	<property name="com.hp.mwlabs.ts.arjuna.services.src" location="services/classes"/>
     <property name="com.hp.mwlabs.ts.arjuna.services.config" location="services/config"/>
     <property name="com.hp.mwlabs.ts.arjuna.services.scripts" location="services/scripts"/>
     <property name="com.hp.mwlabs.ts.arjuna.services.dest" location="${com.hp.mwlabs.ts.arjuna.destroot}/services"/>
@@ -403,7 +405,7 @@
 
     </target>
 
-	<target name="com.hp.mwlabs.ts.arjuna.tests.jar" depends="com.hp.mwlabs.ts.arjuna.tests.compile" if="com.hp.mwlabs.ts.arjuna.tests.compile">
+	<target name="com.hp.mwlabs.ts.arjuna.tests.jar" depends="com.hp.mw.ts.arjuna.tests.run" if="com.hp.mwlabs.ts.arjuna.tests.compile">
 
             <mkdir dir="${com.hp.mwlabs.ts.arjuna.tests.destdir}"/>
             <jar    basedir="${com.hp.mwlabs.ts.arjuna.tests.dest}"
@@ -433,6 +435,25 @@
 
 	</target>
 
+	<target name="com.hp.mw.ts.arjuna.tests.run" depends="com.hp.mwlabs.ts.arjuna.tests.compile" if="com.hp.mwlabs.ts.arjuna.tests.compile">
+        <mkdir dir="${com.hp.mwlabs.ts.arjuna.reports.dest}"/>
+        <junit printsummary="yes">
+            <formatter type="plain"/>
+            <classpath>
+                <pathelement location="${com.hp.mwlabs.ts.arjuna.tests.dest}"/>
+                <path location="${com.hp.mwlabs.ts.arjuna.dest}"/>
+                <pathelement path="${build.classpath}"/>
+                <pathelement location="etc"/>
+            </classpath>
+            <batchtest haltonerror="yes" haltonfailure="yes" fork="yes"
+                todir="${com.hp.mwlabs.ts.arjuna.reports.dest}">
+                <fileset dir="${com.hp.mwlabs.ts.arjuna.tests.src}" includes="**/ReaperTestCase.java"/>
+            </batchtest>
+        </junit>
+    </target>
+
+
+
 	<!-- Jar targets -->
 	<target name="com.hp.mw.ts.arjuna.jar" depends="com.hp.mw.ts.arjuna.compile">
 

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TransactionReaper.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -45,6 +45,8 @@
 
 import com.arjuna.common.util.logging.*;
 
+import java.util.*;
+
 /**
  * Class to record transactions with non-zero timeout values, and class to
  * implement a transaction reaper thread which terminates these transactions
@@ -95,7 +97,7 @@
 
 		_checkPeriod = checkPeriod;
 
-		if (_list == null)
+		if (_transactions == null)
 		{
 			if (tsLogger.arjLoggerI18N.isFatalEnabled())
 			{
@@ -116,14 +118,14 @@
 					"TransactionReaper.finalize ()");
 		}
 
-		_list = null;
+		_transactions = null;
 	}
 
 	public final synchronized long checkingPeriod()
 	{
 		if (_dynamic)
 		{
-			final ReaperElement head = (ReaperElement) _list.peak();
+			final ReaperElement head = (ReaperElement) _transactions.first();  //_list.peak();
 			if (head != null)
 			{
 				return head._absoluteTimeout - System.currentTimeMillis();
@@ -152,25 +154,25 @@
 					"TransactionReaper::check ()");
 		}
 
-		if (_list.size() == 0)
+		if (_transactions.size() == 0)
 			return true;
 
-		OrderedListIterator iter = new OrderedListIterator(_list);
-		ReaperElement e = null;
+		synchronized(_transactions) {
+			Iterator iter = _transactions.iterator();
+			while (iter.hasNext()) {
+				ReaperElement e = (ReaperElement)iter.next();
 
-		while ((e = (ReaperElement) iter.iterate()) != null)
-		{
-			if (tsLogger.arjLoggerI18N.debugAllowed())
-			{
-				tsLogger.arjLoggerI18N
-						.debug(
-								DebugLevel.FUNCTIONS,
-								VisibilityLevel.VIS_PUBLIC,
-								FacilityCode.FAC_ATOMIC_ACTION,
-								"com.arjuna.ats.arjuna.coordinator.TransactionReaper_2",
-								new Object[]
-								{ Long.toString(e._absoluteTimeout) });
-			}
+				if (tsLogger.arjLoggerI18N.debugAllowed())
+				{
+					tsLogger.arjLoggerI18N
+							.debug(
+									DebugLevel.FUNCTIONS,
+									VisibilityLevel.VIS_PUBLIC,
+									FacilityCode.FAC_ATOMIC_ACTION,
+									"com.arjuna.ats.arjuna.coordinator.TransactionReaper_2",
+									new Object[]
+									{ Long.toString(e._absoluteTimeout) });
+				}
 
 			final long now = System.currentTimeMillis();
 			if (now >= e._absoluteTimeout)
@@ -268,13 +270,14 @@
 					}
 				}
 
-				_list.remove(e);
+				iter.remove();
 			}
 			else
 			{
 				break;
 			}
 		}
+		}
 
 		return true;
 	}
@@ -286,7 +289,7 @@
 
 	public final long numberOfTransactions()
 	{
-		return _list.size();
+		return _transactions.size();
 	}
 
 	/**
@@ -313,6 +316,19 @@
 
 		ReaperElement e = new ReaperElement(control, timeout);
 
+		/**
+		 * Ignore if it's already in the list with a different timeout.
+		 * (This should never happen)
+		 */
+
+		Integer oldTimeout = (Integer)_timeouts.get(control);
+		if(oldTimeout != null) {
+			ReaperElement key = new ReaperElement((Reapable)control, oldTimeout.intValue());
+			if(_transactions.contains(key)) {
+				return false;
+			}
+		}
+
 		synchronized (this)
 		{
 			TransactionReaper._lifetime += timeout;
@@ -333,16 +349,11 @@
 		}
 
 		/*
-		 * Can release the lock because the list is internally synchronized.
+		 * Can release the lock because the collection is internally synchronized.
 		 */
 
-		if (_list.insert(e))
-			return true;
-		else
-		{
-			e = null;
-			return false;
-		}
+		_timeouts.put(control, new Integer(timeout));
+		return _transactions.add(e);
 	}
 
 	public final boolean remove(java.lang.Object control)
@@ -357,43 +368,12 @@
 		if (control == null)
 			return false;
 
-		boolean result = false;
-		boolean found = false;
-		ReaperElement e = null;
-		OrderedListIterator iter = new OrderedListIterator(_list);
-
-		synchronized (this)
-		{
-			while (!found && ((e = (ReaperElement) iter.iterate()) != null))
-			{
-				try
-				{
-					found = e._control.equals(control);
-
-					break;
-				}
-				catch (Exception e2)
-				{
-					break;
-				}
-			}
-
-			iter = null;
+		Integer timeout = (Integer)_timeouts.get(control);
+		if(timeout == null) {
+			return false;
 		}
-
-		/*
-		 * Can do this after the lock is released because the list is
-		 * internally synchronized.
-		 */
-
-		if (found)
-		{
-			result = _list.remove(e);
-
-			e = null;
-		}
-
-		return result;
+		ReaperElement key = new ReaperElement((Reapable)control, timeout.intValue());
+		return _transactions.remove(key);
 	}
 
 	/**
@@ -405,7 +385,7 @@
 
 	public final int getTimeout(Object control)
 	{
-		if ((_list.size() == 0) || (control == null))
+		if ((_transactions.size() == 0) || (control == null))
 		{
 			if (tsLogger.arjLogger.debugAllowed())
 			{
@@ -419,48 +399,22 @@
 			return 0;
 		}
 
-		ReaperElement e = null;
-		OrderedListIterator iter = new OrderedListIterator(_list);
+		Integer timeout = (Integer)_timeouts.get(control);
 
-		while ((e = (ReaperElement) iter.iterate()) != null)
-		{
-			try
-			{
-				if (e._control.equals(control))
-				{
-					iter = null;
-
-					if (tsLogger.arjLoggerI18N.debugAllowed())
-					{
-						tsLogger.arjLoggerI18N
-								.debug(
-										DebugLevel.FUNCTIONS,
-										VisibilityLevel.VIS_PUBLIC,
-										FacilityCode.FAC_ATOMIC_ACTION,
-										"com.arjuna.ats.arjuna.coordinator.TransactionReaper_6",
-										new Object[]
-										{ control, Integer.toString(e._timeout) });
-					}
-
-					return e._timeout;
-				}
-			}
-			catch (Exception e2)
-			{
-				break;
-			}
+		if(timeout == null) {
+			timeout = new Integer(0);
 		}
 
-		if (tsLogger.arjLoggerI18N.debugAllowed())
-		{
-			tsLogger.arjLoggerI18N.debug(DebugLevel.FUNCTIONS,
-					VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
-					"com.arjuna.ats.arjuna.coordinator.TransactionReaper_6",
-					new Object[]
-					{ control, "0" });
-		}
+		tsLogger.arjLoggerI18N
+				.debug(
+						DebugLevel.FUNCTIONS,
+						VisibilityLevel.VIS_PUBLIC,
+						FacilityCode.FAC_ATOMIC_ACTION,
+						"com.arjuna.ats.arjuna.coordinator.TransactionReaper_6",
+						new Object[]
+								{ control, timeout });
 
-		return 0;
+		return timeout.intValue();
 	}
 
 	/**
@@ -566,7 +520,8 @@
 		_theReaper = null;
 	}
 
-	private OrderedList _list = new OrderedList();
+	private SortedSet _transactions = Collections.synchronizedSortedSet(new TreeSet()); // C of ReaperElement
+	private Map _timeouts = new WeakHashMap(); // key = Reapable, value = Integer
 
 	private long _checkPeriod = 0;
 

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/coordinator/ReaperElement.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public License,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -39,7 +39,7 @@
 
 import com.arjuna.ats.internal.arjuna.template.OrderedListElement;
 
-public class ReaperElement implements OrderedListElement
+public class ReaperElement implements Comparable
 {
 
 	/*
@@ -81,49 +81,42 @@
 		_control = null;
 	}
 
-	public final boolean equals(OrderedListElement e)
-	{
-		if (tsLogger.arjLogger.debugAllowed())
-		{
-			tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
-					VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
-					"ReaperElement.equals ()");
-		}
 
-		if (e instanceof ReaperElement)
-			return (_absoluteTimeout == ((ReaperElement) e)._absoluteTimeout);
-		else
-			return false;
+	public boolean equals(Object obj)
+	{
+		return (this.compareTo(obj) == 0 ? true : false);
 	}
 
-	public final boolean lessThan(OrderedListElement e)
+	public int hashCode()
 	{
-		if (tsLogger.arjLogger.debugAllowed())
-		{
-			tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
-					VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
-					"ReaperElement.lessThan ()");
-		}
-
-		if (e instanceof ReaperElement)
-			return (_absoluteTimeout < ((ReaperElement) e)._absoluteTimeout);
-		else
-			return false;
+		int hashCode = _control.get_uid().hashCode();
+		hashCode ^= _absoluteTimeout;
+		return hashCode;
 	}
 
-	public final boolean greaterThan(OrderedListElement e)
+	/**
+	 * Order by absoluteTimeout first, then by Uid.
+	 * This is required so that the set maintained by the TransactionReaper
+	 * is in timeout order for efficient processing.
+	 *
+	 * @param o
+	 * @return
+	 */
+	public int compareTo(Object o)
 	{
-		if (tsLogger.arjLogger.debugAllowed())
-		{
-			tsLogger.arjLogger.debug(DebugLevel.OPERATORS,
-					VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ATOMIC_ACTION,
-					"ReaperElement.greaterThan ()");
-		}
+		ReaperElement other = (ReaperElement)o;
 
-		if (e instanceof ReaperElement)
-			return (_absoluteTimeout > ((ReaperElement) e)._absoluteTimeout);
-		else
-			return false;
+		if(_absoluteTimeout == other._absoluteTimeout) {
+			if(_control.get_uid().equals(other._control.get_uid())) {
+				return 0;
+			} else if (_control.get_uid().greaterThan(other._control.get_uid())) {
+				return 1;
+			} else {
+				return -1;
+			}
+		} else {
+			return (_absoluteTimeout > other._absoluteTimeout) ? 1 : -1;
+		}
 	}
 
 	public Reapable _control;
@@ -131,5 +124,4 @@
 	public long _absoluteTimeout;
 
 	public int _timeout;
-
 }

Copied: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper (from rev 11545, labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper)

Deleted: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2007,
- * @author JBoss, a division of Red Hat.
- */
-package com.hp.mwtests.ts.arjuna.reaper;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
-import com.arjuna.ats.arjuna.coordinator.Reapable;
-import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.internal.arjuna.coordinator.ReaperElement;
-
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * Exercises some aspects of the TransactionReaper functionality.
- * @author jonathan.halliday at redhat.com, 2007-04-30
- */
-public class ReaperTestCase extends TestCase
-{
-	public static Test suite() {
-		return new TestSuite(ReaperTestCase.class);
-	}
-
-	public void testReaper() throws Exception {
-
-		// test set+readback of interval
-		TransactionReaper.create(100);
-		TransactionReaper reaper = TransactionReaper.transactionReaper();
-		assertTrue(reaper.checkingPeriod() == 100);
-
-
-		Reapable reapable = new MockReapable(new Uid());
-		Reapable reapable2 = new MockReapable(new Uid());
-		Reapable reapable3 = new MockReapable(new Uid());
-
-		ReaperElement reaperElement = new ReaperElement(reapable, 30);
-		ReaperElement reaperElement2 = new ReaperElement(reapable2, 20);
-		ReaperElement reaperElement3 = new ReaperElement(reapable3, 10);
-
-		// test that ordering is by timeout, regardless of insertion order
-		SortedSet sortedSet = new TreeSet();
-		sortedSet.add(reaperElement);
-		sortedSet.add(reaperElement3);
-		sortedSet.add(reaperElement2);
-
-		assertTrue(sortedSet.first() == reaperElement3);
-		assertTrue(sortedSet.last() == reaperElement);
-
-		// test insertion of timeout=0 is a nullop
-		assertTrue(reaper.insert(reapable, 0));
-		assertTrue(reaper.numberOfTransactions() == 0);
-		assertFalse(reaper.remove(reapable));
-
-		// test that duplicate insertion fails
-		assertTrue(reaper.insert(reapable, 10));
-		assertFalse(reaper.insert(reapable, 10));
-		assertTrue(reaper.numberOfTransactions() == 1);
-		assertTrue(reaper.remove(reapable));
-		assertTrue(reaper.numberOfTransactions() == 0);
-
-		// test that timeout change fails
-		assertTrue(reaper.insert(reapable, 10));
-		assertFalse(reaper.insert(reapable, 20));
-		assertTrue(reaper.numberOfTransactions() == 1);
-		assertTrue(reaper.getTimeout(reapable) == 10);
-		assertTrue(reaper.remove(reapable));
-		assertTrue(reaper.numberOfTransactions() == 0);
-
-		// test reaping
-		reaper.insert(reapable, 1); // seconds
-		reaper.insert(reapable2, 5);
-		assertTrue(reaper.numberOfTransactions() == 2);
-		reaper.check();
-		assertTrue(reaper.numberOfTransactions() == 2);
-		Thread.sleep(2*1000);
-		reaper.check();
-		assertTrue(reaper.numberOfTransactions() == 1);
-		Thread.sleep(4*1000);
-		reaper.check();
-		assertTrue(reaper.numberOfTransactions() == 0);
-
-	}
-
-	public class MockReapable implements Reapable
-	{
-		public MockReapable(Uid uid) {
-			this.uid = uid;
-		}
-
-		public boolean running()
-		{
-			return false;  //To change body of implemented methods use File | Settings | File Templates.
-		}
-
-		public boolean preventCommit()
-		{
-			return false;  //To change body of implemented methods use File | Settings | File Templates.
-		}
-
-		public int cancel()
-		{
-			return 0;  //To change body of implemented methods use File | Settings | File Templates.
-		}
-
-		public Uid get_uid()
-		{
-			return uid;
-		}
-
-		private Uid uid;
-	}
-}

Copied: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java (from rev 11545, labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java)
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java	                        (rev 0)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperTestCase.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2007,
+ * @author JBoss, a division of Red Hat.
+ */
+package com.hp.mwtests.ts.arjuna.reaper;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
+import com.arjuna.ats.arjuna.coordinator.Reapable;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.internal.arjuna.coordinator.ReaperElement;
+
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+/**
+ * Exercises some aspects of the TransactionReaper functionality.
+ * @author jonathan.halliday at redhat.com, 2007-04-30
+ */
+public class ReaperTestCase extends TestCase
+{
+	public static Test suite() {
+		return new TestSuite(ReaperTestCase.class);
+	}
+
+	public void testReaper() throws Exception {
+
+		// test set+readback of interval
+		TransactionReaper.create(100);
+		TransactionReaper reaper = TransactionReaper.transactionReaper();
+		assertTrue(reaper.checkingPeriod() == 100);
+
+
+		Reapable reapable = new MockReapable(new Uid());
+		Reapable reapable2 = new MockReapable(new Uid());
+		Reapable reapable3 = new MockReapable(new Uid());
+
+		ReaperElement reaperElement = new ReaperElement(reapable, 30);
+		ReaperElement reaperElement2 = new ReaperElement(reapable2, 20);
+		ReaperElement reaperElement3 = new ReaperElement(reapable3, 10);
+
+		// test that ordering is by timeout, regardless of insertion order
+		SortedSet sortedSet = new TreeSet();
+		sortedSet.add(reaperElement);
+		sortedSet.add(reaperElement3);
+		sortedSet.add(reaperElement2);
+
+		assertTrue(sortedSet.first() == reaperElement3);
+		assertTrue(sortedSet.last() == reaperElement);
+
+		// test insertion of timeout=0 is a nullop
+		assertTrue(reaper.insert(reapable, 0));
+		assertTrue(reaper.numberOfTransactions() == 0);
+		assertFalse(reaper.remove(reapable));
+
+		// test that duplicate insertion fails
+		assertTrue(reaper.insert(reapable, 10));
+		assertFalse(reaper.insert(reapable, 10));
+		assertTrue(reaper.numberOfTransactions() == 1);
+		assertTrue(reaper.remove(reapable));
+		assertTrue(reaper.numberOfTransactions() == 0);
+
+		// test that timeout change fails
+		assertTrue(reaper.insert(reapable, 10));
+		assertFalse(reaper.insert(reapable, 20));
+		assertTrue(reaper.numberOfTransactions() == 1);
+		assertTrue(reaper.getTimeout(reapable) == 10);
+		assertTrue(reaper.remove(reapable));
+		assertTrue(reaper.numberOfTransactions() == 0);
+
+		// test reaping
+		reaper.insert(reapable, 1); // seconds
+		reaper.insert(reapable2, 5);
+		assertTrue(reaper.numberOfTransactions() == 2);
+		reaper.check();
+		assertTrue(reaper.numberOfTransactions() == 2);
+		Thread.sleep(2*1000);
+		reaper.check();
+		assertTrue(reaper.numberOfTransactions() == 1);
+		Thread.sleep(4*1000);
+		reaper.check();
+		assertTrue(reaper.numberOfTransactions() == 0);
+
+	}
+
+	public class MockReapable implements Reapable
+	{
+		public MockReapable(Uid uid) {
+			this.uid = uid;
+		}
+
+		public boolean running()
+		{
+			return false;  //To change body of implemented methods use File | Settings | File Templates.
+		}
+
+		public boolean preventCommit()
+		{
+			return false;  //To change body of implemented methods use File | Settings | File Templates.
+		}
+
+		public int cancel()
+		{
+			return 0;  //To change body of implemented methods use File | Settings | File Templates.
+		}
+
+		public Uid get_uid()
+		{
+			return uid;
+		}
+
+		private Uid uid;
+	}
+}

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public License,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -286,7 +286,7 @@
 		try
 		{
 			saveOperation = new MBeanOperationInfo("Save the properties",
-					this.getClass().getMethod("save", null));
+					this.getClass().getMethod("save", (Class[])null));
 		}
 		catch (NoSuchMethodException e)
 		{

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/subordinate/TransactionImple.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/subordinate/TransactionImple.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/subordinate/TransactionImple.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -307,14 +307,17 @@
 		{
 			SubordinateAtomicTransaction subAct = (SubordinateAtomicTransaction) super._theTransaction;
 
-			try
+			if (!endSuspendedRMs())
 			{
-				_theTransaction.rollbackOnly();
+        			try
+        			{
+        				_theTransaction.rollbackOnly();
+        			}
+        			catch (org.omg.CosTransactions.NoTransaction ex)
+        			{
+        				// shouldn't happen! ignore because commit will fail next anyway.
+        			}
 			}
-			catch (org.omg.CosTransactions.NoTransaction ex)
-			{
-				// shouldn't happen! ignore because commit will fail next anyway.
-			}
 			
 			int status = subAct.doOnePhaseCommit();
 

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
  * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt in the distribution for a full listing 
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
  * of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  * You should have received a copy of the GNU General Public License,
  * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -63,8 +63,8 @@
  * The class is used to perform WS-Transaction context insertion
  * and extraction for application level SOAP messages using JaxRPC.
  *
- * @message com.arjuna.mw.wst.client.JaxRPCHCP_1 [com.arjuna.mw.wst.client.JaxRPCHCP_1] - Error in: 
- * @message com.arjuna.mw.wst.client.JaxRPCHCP_2 [com.arjuna.mw.wst.client.JacRPCHCP_2] - Stack trace: 
+ * @message com.arjuna.mw.wst.client.JaxRPCHCP_1 [com.arjuna.mw.wst.client.JaxRPCHCP_1] - Error in:
+ * @message com.arjuna.mw.wst.client.JaxRPCHCP_2 [com.arjuna.mw.wst.client.JacRPCHCP_2] - Stack trace:
  */
 
 public class JaxRPCHeaderContextProcessor implements Handler
@@ -73,7 +73,7 @@
      * The handler information.
      */
     private HandlerInfo handlerInfo ;
-    
+
     /**
      * Initialise the handler information.
      * @param handlerInfo The handler information.
@@ -82,23 +82,23 @@
     {
         this.handlerInfo = handlerInfo ;
     }
-    
+
     /**
      * Destroy the handler.
      */
     public void destroy()
     {
     }
-    
+
     /**
      * Get the headers.
      * @return the headers.
      */
     public QName[] getHeaders()
     {
-        return handlerInfo.getHeaders() ;
+		return new QName[] {new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT)};
     }
-    
+
     /**
      * Handle the request.
      * @param messageContext The current message context.
@@ -108,7 +108,7 @@
     {
         final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage == null)
         {
             return true ;
@@ -134,7 +134,7 @@
             {
                 atContext = null ;
             }
-            
+
             final Context baContext ;
             if (businessActivityManager != null)
             {
@@ -146,7 +146,7 @@
             {
                 baContext = null ;
             }
-            
+
             final CoordinationContextType coordinationContext ;
             if (atContext != null)
             {
@@ -160,7 +160,7 @@
             {
                 coordinationContext = null ;
             }
-            
+
             if (coordinationContext != null)
             {
                 final SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope() ;
@@ -176,7 +176,7 @@
                 CoordinationContextHelper.serialise(env, headerElement, coordinationContext) ;
             }
         }
-        catch (final Throwable th) 
+        catch (final Throwable th)
         {
 	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxRPCHCP_1",
 					  new Object[]{"com.arjuna.mw.wst.client.JaxRPCHeaderContextProcessor.handleRequest()"});
@@ -199,7 +199,7 @@
         resumeTransaction(messageContext) ;
         return true ;
     }
-    
+
     /**
      * Handle the fault.
      * @param messageContext The current message context.
@@ -209,25 +209,25 @@
         resumeTransaction(messageContext) ;
         return true ;
     }
-    
+
     /**
      * Resume the current transaction.
      *
-     * @message com.arjuna.mw.wst.client.JaxRPCHCP_3 [com.arjuna.mw.wst.client.JaxRPCHCP_3] - Unknown context type: 
+     * @message com.arjuna.mw.wst.client.JaxRPCHCP_3 [com.arjuna.mw.wst.client.JaxRPCHCP_3] - Unknown context type:
      */
 
     private void resumeTransaction(final MessageContext messageContext)
     {
         final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage != null)
         {
             try
             {
                 final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
                 final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapEnvelope, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-                
+
                 if (soapHeaderElement != null)
                 {
                     final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
@@ -255,7 +255,7 @@
                     }
                 }
             }
-            catch (final Throwable th) 
+            catch (final Throwable th)
             {
         		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxRPCHCP_1",
                     new Object[]{"com.arjuna.mw.wst.client.JaxRPCHeaderContextProcessor.resumeTransaction()"});
@@ -294,7 +294,7 @@
         }
         return null ;
     }
-    
+
     /**
      * Do the two references match?
      * @param lhs The first reference.

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
  * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt in the distribution for a full listing 
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
  * of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  * You should have received a copy of the GNU General Public License,
  * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -63,9 +63,9 @@
  * The class is used to perform WS-Transaction context insertion
  * and extraction for application level SOAP messages using JaxRPC.
  *
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_1 [com.arjuna.mw.wst.service.JaxRPCHCP_1] - Error in: 
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_2 [com.arjuna.mw.wst.service.JaxRPCHCP_2] - Stack trace: 
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_3 [com.arjuna.mw.wst.service.JaxRPCHCP_3] - Unknown context type: 
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_1 [com.arjuna.mw.wst.service.JaxRPCHCP_1] - Error in:
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_2 [com.arjuna.mw.wst.service.JaxRPCHCP_2] - Stack trace:
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_3 [com.arjuna.mw.wst.service.JaxRPCHCP_3] - Unknown context type:
  */
 
 public class JaxRPCHeaderContextProcessor implements Handler
@@ -74,7 +74,7 @@
      * The handler information.
      */
     private HandlerInfo handlerInfo ;
-    
+
     /**
      * Initialise the handler information.
      * @param handlerInfo The handler information.
@@ -83,32 +83,32 @@
     {
         this.handlerInfo = handlerInfo ;
     }
-    
+
     /**
      * Destroy the handler.
      */
     public void destroy()
     {
     }
-    
+
     /**
      * Get the headers.
      * @return the headers.
      */
     public QName[] getHeaders()
     {
-        return handlerInfo.getHeaders() ;
+		return new QName[] {new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT)};
     }
-    
+
     /**
      * Handle the request.
      * @param messageContext The current message context.
      */
     public boolean handleRequest(final MessageContext messageContext)
     {
-        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
+		final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage != null)
         {
             try
@@ -116,7 +116,7 @@
                 final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
                 final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
                 final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapHeader, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-                
+
                 if (soapHeaderElement != null)
                 {
                     final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
@@ -143,7 +143,7 @@
                     }
                 }
             }
-            catch (final Throwable th) 
+            catch (final Throwable th)
             {
         		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxRPCHCP_1",
                     new Object[]{"com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor.handleRequest(MessageContext context)"});
@@ -164,7 +164,7 @@
         suspendTransaction() ;
         return true ;
     }
-    
+
     /**
      * Handle the fault.
      * @param messageContext The current message context.
@@ -174,13 +174,13 @@
         suspendTransaction() ;
         return true ;
     }
-    
+
     /**
      * Suspend the current transaction.
      */
     private void suspendTransaction()
     {
-        try 
+        try
         {
             /*
              * There should either be an Atomic Transaction *or* a Business Activity
@@ -193,13 +193,13 @@
             {
                 transactionManager.suspend() ;
             }
-            
+
             if (businessActivityManager != null)
             {
                 businessActivityManager.suspend() ;
             }
         }
-        catch (final Throwable th) 
+        catch (final Throwable th)
         {
 	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxRPCHCP_1",
 					  new Object[]{"com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor.suspendTransaction()"});
@@ -238,7 +238,7 @@
         }
         return null ;
     }
-    
+
     /**
      * Do the two references match?
      * @param lhs The first reference.
@@ -256,7 +256,7 @@
             return lhs.equals(rhs) ;
         }
     }
-    
+
     /**
      * Clear the soap MustUnderstand.
      * @param soapHeader The SOAP header.
@@ -266,10 +266,10 @@
     	throws SOAPException
     {
 	final Name headerName = soapHeader.getElementName() ;
-	
+
 	final SOAPFactory factory = SOAPFactory.newInstance() ;
 	final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()) ;
-	
+
 	soapHeaderElement.removeAttribute(attributeName) ;
     }
 }

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/DurableTwoPhaseCommitParticipant.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/DurableTwoPhaseCommitParticipant.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/XTS/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/DurableTwoPhaseCommitParticipant.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -201,7 +201,11 @@
 				v = new VoteCancel();
 			}
 				
-			if (v instanceof VoteCancel)
+                        if (v instanceof VoteReadOnly)
+                        {
+                            _readonly = true;
+                        }
+                        else if (v instanceof VoteCancel)
 			{
 				_rolledback = false;
 

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/build.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/build.xml	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/build.xml	2007-05-01 10:59:57 UTC (rev 11546)
@@ -155,7 +155,8 @@
             destdir="${com.hp.mwlabs.ts.common.dest}"
             classpath="${com.arjuna.common.src}"
             excludes="${com.arjuna.common.compile.excludes}"
-            debug="${com.hp.mwlabs.ts.common.debug}">
+            debug="${com.hp.mwlabs.ts.common.debug}"
+			deprecation="${com.hp.mw.deprecation}">
             <classpath>
                 <path path="${build.classpath}"/>
                 <path path="${com.arjuna.common.src}"/>

Modified: labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/classes/com/arjuna/common/internal/util/logging/DefaultLog.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/classes/com/arjuna/common/internal/util/logging/DefaultLog.java	2007-05-01 10:13:48 UTC (rev 11545)
+++ labs/jbosstm/branches/JBOSSTS_4_2_3_GA_SP/common/classes/com/arjuna/common/internal/util/logging/DefaultLog.java	2007-05-01 10:59:57 UTC (rev 11546)
@@ -636,11 +636,11 @@
         if (classLoader == null) {
             try {
                 // Are we running on a JDK 1.2 or later system?
-                Method method = Thread.class.getMethod("getContextClassLoader", null);
+                Method method = Thread.class.getMethod("getContextClassLoader", (Class[])null);
 
                 // Get the thread context class loader (if there is one)
                 try {
-                    classLoader = (ClassLoader)method.invoke(Thread.currentThread(), null);
+                    classLoader = (ClassLoader)method.invoke(Thread.currentThread(), (Object[])null);
                 } catch (IllegalAccessException e) {
                     ;  // ignore
                 } catch (InvocationTargetException e) {




More information about the jboss-svn-commits mailing list