[jboss-svn-commits] JBL Code SVN: r18100 - in labs/jbosstm/workspace/adinn/XTSGF: WS-C/dev/src/com/arjuna/services/framework/startup and 34 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jan 25 04:44:36 EST 2008


Author: adinn
Date: 2008-01-25 04:44:36 -0500 (Fri, 25 Jan 2008)
New Revision: 18100

Added:
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/Sagas11HLSImple.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/TwoPhase11HLSImple.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml
Removed:
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerFactoryWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivityManagerWSImple.java
Modified:
   labs/jbosstm/workspace/adinn/XTSGF/README
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/services/framework/startup/Sequencer.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpClientInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpServiceMultiplexorServlet.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationRequesterInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationRequesterInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml
   labs/jbosstm/workspace/adinn/XTSGF/sar/src/org/jboss/transactions/XTSService.java
Log:
version which allows side by side operation of 1.0 and 1.1 WSCOOR services

Modified: labs/jbosstm/workspace/adinn/XTSGF/README
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/README	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/README	2008-01-25 09:44:36 UTC (rev 18100)
@@ -3,6 +3,13 @@
 (release v2b58g). It successfully implements the WSCOOR, WSAT and WSBA
 protocols, exposing them via JaxWS services.
 
+This version of XTS allows the 1.0 and 1.1 services to operate side by
+side. The configuration files for the 1.0 services are wst.xml,
+wstx.xml and wscf.xml. Those for the 1.1. services are wst11.xml,
+wstx11.xml and wscf11.xml. The current demo employs the 1.1. services
+and, accordingly, uses the 1.1 versions of Transactionfactory,
+Transaction, BusinessActivityFactory, etc in the WSTX/.../wst tree.
+
 In order to build this implementation (and its associated demo
 program) you need first to download a JBossTS source tree, build it
 (using command 'ant jta') and set environment variable JBOSS_JTA to

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/services/framework/startup/Sequencer.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/services/framework/startup/Sequencer.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/services/framework/startup/Sequencer.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -5,108 +5,127 @@
 import java.util.List;
 
 /**
- * A manager which allows each of the XTS applications to register startup callbacks to be run in the correct
- * order even if the applications are started out of order.
+ * A manager which allows initializaton callabcks for a suite of related web apps to be registered and subsequently
+ * run in a fixed order, irrespective of the order in which the application server initializes the web apps.
+ *
+ * Sequencer maintains two lists of independently managed callbacks, one for the WSCOOR 1.0 web app suite and one
+ * for the WSCOOR 1.1 web app suite. When registering a callback listeners or servlets for a given web app supply a
+ * sequence id and a web app id to identify i) the required sequence and ii) the entry in the sequence at which the
+ * callback should be stored. If a web app registers multiple callbacks they are stored in the sequence entry as a
+ * list in registration order. Once a web app has registered all its callbacks it closes the relevant entry. When
+ * all entries i a sequence have been closed the entries are traversed in order and the callbacks in each entry are
+ * triggered, thus ensuring that callbacks for web apps with lower sequence indices complete before callbacks with
+ * higher indices are called.
+ *
  * User: adinn
  * Date: Nov 30, 2007
  * Time: 4:05:13 PM
- * To change this template use File | Settings | File Templates.
  */
 public class Sequencer {
     // public API
 
     /*
+     * indices for the independent startup sequences which we manage
+     */
+
+    /**
+     *  index of startup sequence used for serialization of WSCOOR 1.0 initialization callbacks
+     */
+    public static final int SEQUENCE_WSCOOR10 = 0;
+
+    /**
+     *  index of startup sequence used for serialization of WSCOOR 1.1 initialization callbacks
+     */
+    public static final int SEQUENCE_WSCOOR11 = SEQUENCE_WSCOOR10 + 1;
+
+    /**
+     *  count of independent startup sequences.
+     */
+    public static final int SEQUENCE_MAX = SEQUENCE_WSCOOR11 + 1;
+
+    /*
      * indices for sequence of web apps we need to ensure start in the correct order
      */
 
     /**
-     * WS-C initialises first
+     * index of WS-C web app which initialises first in 1.0
      */
-    public static final int WEBAPP_WSC = 0;
+    public static final int WEBAPP_WSC10 = 0;
 
     /**
-     * WS-C11 initialises second
+     * index of WS-T web app which initialises second in 1.0
      */
-    public static final int WEBAPP_WSC11 = 1;
+    public static final int WEBAPP_WST10 = WEBAPP_WSC10 + 1;
 
     /**
-     * WS-T initialises third
+     * index of WSCF web app which intiialises third in 1.0
      */
-    public static final int WEBAPP_WST = 2;
+    public static final int WEBAPP_WSCF10 = WEBAPP_WST10 + 1;
 
     /**
-     * WS-T11 initialises fourth
+     * index of WSTX web app which initialises last in 1.0
      */
-    public static final int WEBAPP_WST11 = 3;
+    public static final int WEBAPP_WSTX10 = WEBAPP_WSCF10 + 1;
 
     /**
-     * WSCF intiialises fifth
+     * there are four startup apps in the 1.0 sequence
      */
-    public static final int WEBAPP_WSCF = 4;
+    public static final int WEBAPP_MAX10 = WEBAPP_WSTX10 + 1;
 
     /**
-     * WSCF intiialises sixth
+     * index of WS-C web app which initialises first in 1.1
      */
-    public static final int WEBAPP_WSCF11 = 5;
+    public static final int WEBAPP_WSC11 = 0;
 
     /**
-     * WSTCX initialises last
+     * index of WS-T web app which initialises second in 1.1
      */
-    public static final int WEBAPP_WSTX = 6;
+    public static final int WEBAPP_WST11 = WEBAPP_WSC11 + 1;
 
     /**
-     * there are only seven startup apps in the XTS implementation
+     * index of WSCF web app which intiialises third in 1.1
      */
-    public static final int WEBAPP_MAX = 7;
+    public static final int WEBAPP_WSCF11 = WEBAPP_WST11 + 1;
 
     /**
-     * append a startup callback to the end of the liost registered for a particular XTS web app
-     * @param callback a callback to add to the list for a given web app
-     * @param webapp one of the foue possible webapp ids defined by this class
+     * index of WSTX web app which intiialises fourth in 1.1
      */
-    public static final void register(Callback callback, int webapp)
-    {
-        // insert the callback into the appropriate list
-        if (callbacks == null) {
-            callbacks = new ArrayList[WEBAPP_MAX];
-            closed = new boolean[WEBAPP_MAX];
-            for (int i = 0; i < WEBAPP_MAX; i++) {
-                callbacks[i] = new ArrayList<Callback>();
-                closed[i] = false;
-            }
-        }
-        callbacks[webapp].add(callback);
-    }
+    public static final int WEBAPP_WSTX11 = WEBAPP_WSCF11 + 1;
 
     /**
-     * notify end of callback registration for a specific web app
+     * there are three startup apps in the 1.1 sequence
+     */
+    public static final int WEBAPP_MAX11 = WEBAPP_WSTX11 + 1;
+
+    /**
+     * notify end of callback registration for a web app associated with a given sequence
      * @param webapp
      */
-    public static final void close(int webapp)
+
+    public static final void close(int sequence, int webapp)
     {
-        closed[webapp] = true;
-        closedCount++;
-        if (closedCount == WEBAPP_MAX) {
-            runCallbacks();
-        }
+        SEQUENCERS[sequence].close(webapp);
     }
 
     /**
-     * callback class specialised by client web apps to execute startup code
+     * a callback class specialised by client web apps to execute startup code
      */
     public static abstract class Callback
     {
         /**
-         * register this callback when it is created
+         * construct a callback associated with a web app in a given startup sequence and automatically register it
+         * for subsequent execution
+         * @param sequence the sequence in which the web app is contained either WSCOOR_1_0 or WSCOOR_1_1
          * @param webapp the web app with which this callback is associated
          */
-        public Callback(int webapp)
+        public Callback(int sequence, int webapp)
         {
-            register(this, webapp);
+            register(this, sequence, webapp);
         }
 
         /**
-         * callback method invoked per callback in registration order per web app in web app order
+         * a callback method which is invoked invoked per callback in registration order per web app in web app
+         * order per sequence as soon as all callback lists in the sequence have been closed
          */
         public abstract void run();
     }
@@ -114,28 +133,76 @@
     // private implementation
 
     /**
-     * array of lists to hold callbacks registered per web app
+     * a global list of all startup sequences
      */
-    private static List<Callback>[] callbacks = null;
+    private static final Sequencer[] SEQUENCERS =
+            {
+                    new Sequencer(WEBAPP_MAX10),
+                    new Sequencer(WEBAPP_MAX11)
+            };
 
     /**
-     * array of flags per web app initially false and set to trrue when a web app has registered all its callbacks
+     * method called by the Callback constructor to append a startup callback to the list for a web
+     * app in the appropriate startup sequence
+     * @param callback a callback to add to the list for the web app
+     * @param sequence the sequence in which the web app is contained either WSCOOR_1_0 or WSCOOR_1_1
+     * @param webapp the web app with which this callback is associated
      */
-    private static boolean[] closed;
 
+    private static final void register(Callback callback, int sequence, int webapp)
+    {
+        SEQUENCERS[sequence].register(callback, webapp);
+    }
+
     /**
+     * each sequence contians an array of lists to hold callbacks registered per web app
+     */
+    private List<Callback>[] callbacks;
+
+    /**
+     * each sequence contains an array of flags per web app initially false and set to true when a web app has
+     * registered all its callbacks and called close
+     */
+    private boolean[] closed;
+
+    /**
      * counter incremented each time a callback list is closed. callback processing is triggered when this reaches the
-     * web app count
+     * sequence size count
      */
-    private static int closedCount = 0;
+    private int closedCount;
 
-    private static void runCallbacks()
+    /**
+     * count which sizes the callbacks list and closed array.
+     */
+    private int sequenceSize;
+
+    /**
+     * insert a callback into the list for a given web app associated with this sequence
+     * @param callback the callback to be registerd
+     * @param webapp the web app with which the callback is associated
+     */
+    private final void register(Callback callback, int webapp)
     {
-        if (callbacks == null) {
-            return;
+        callbacks[webapp].add(callback);
+    }
+
+    /**
+     * close the callback list associated with a given web app in this sequence and, if this is the last unclosed
+     * list, trigger execution of all callbacks in sequence order
+     * @param webapp the web app whose callback list is to be closed
+     */
+    private final void close(int webapp)
+    {
+        closed[webapp] = true;
+        closedCount++;
+        if (closedCount == sequenceSize) {
+            runCallbacks();
         }
+    }
 
-        for (int i = 0; i < WEBAPP_MAX; i++) {
+    private void runCallbacks()
+    {
+        for (int i = 0; i < sequenceSize; i++) {
             Iterator<Callback> iter = callbacks[i].iterator();
             while (iter.hasNext()) {
                 Callback cb = iter.next();
@@ -143,4 +210,20 @@
             }
         }
     }
+
+    /**
+     * construct a Sequencer to manage registration and execution of callbacks associated with an ordered sequence
+     * of web apps
+     * @param sequenceSize count of the number of web apps for which callbacks are to be registered
+     */
+    private Sequencer(int sequenceSize)
+    {
+        this.sequenceSize = sequenceSize;
+        callbacks = new ArrayList[sequenceSize];
+        for (int i = 0; i < sequenceSize; i++) {
+            callbacks[i] = new ArrayList<Callback>();
+        }
+        closed = new boolean[sequenceSize];
+        closedCount = 0;
+    }
 }

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpClientInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpClientInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpClientInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -39,7 +39,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                final SoapClient client = new HttpClient() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpServiceMultiplexorServlet.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpServiceMultiplexorServlet.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/transport/http/HttpServiceMultiplexorServlet.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -379,7 +379,7 @@
     {
         final HttpServiceMultiplexorServlet servlet = this;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                soapRegistry.registerSoapServiceProvider(HttpUtils.HTTP_SCHEME, servlet) ;
@@ -393,7 +393,7 @@
         baseHttpsURI = processURI(servletConfig.getInitParameter("BaseHttpsURI")) ;
 
         // this is the last WSC callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WSC);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10);
 
         final String logPacketValue = servletConfig.getInitParameter("LogPackets") ;
         if (logPacketValue != null)

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -43,7 +43,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/ActivationService";
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
            public void run() {
                // TODO if we rely upon JaxWS to automatically publish implementation classes it will only
                // do so under a URL based on service name. which means we cannot define a service using

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationRequesterInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationRequesterInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationRequesterInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -43,7 +43,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/RegistrationService";
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationRequesterInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationRequesterInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationRequesterInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -43,7 +43,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -41,7 +41,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSC10) {
            public void run() {
                ActivationCoordinatorProcessor.setCoordinator(new ActivationCoordinatorProcessorImpl()) ;
                RegistrationCoordinatorProcessor.setCoordinator(new RegistrationCoordinatorProcessorImpl()) ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -41,14 +41,14 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSC) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
            public void run() {
                ActivationCoordinatorProcessorWS.setCoordinator(new ActivationCoordinatorProcessorWSImpl()) ;
                RegistrationCoordinatorProcessorWS.setCoordinator(new RegistrationCoordinatorProcessorWSImpl()) ;
            }
         };
         // this is the last WSC callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WSC11);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11);
     }
 
     /**

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + ArjunaTXWSConstants.TERMINATION_COORDINATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -47,7 +47,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -51,7 +51,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + ArjunaTXWSConstants.TERMINATION_PARTICIPANT_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + AtomicTransactionWSConstants.COORDINATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + AtomicTransactionWSConstants.PARTICIPANT_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -51,7 +51,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -51,7 +51,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -44,7 +44,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
         

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -51,7 +51,7 @@
         String baseURI = context.getInitParameter("BaseURI");
         final String uri = baseURI + "/" + BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                // TODO work out how to configure the endpoint name here
                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -54,7 +54,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10) {
            public void run() {
                CompletionCoordinatorProcessor.setProcessor(new CompletionCoordinatorProcessorImpl()) ;
                ParticipantProcessor.setProcessor(new ParticipantProcessorImpl()) ;
@@ -67,7 +67,7 @@
            }
         };
         // this is the last WST callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WST);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST10);
     }
 
     /**

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -47,7 +47,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WST11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
            public void run() {
                CompletionCoordinatorProcessorWS.setProcessor(new CompletionCoordinatorProcessorWSImpl()) ;
                ParticipantProcessorWS.setProcessor(new ParticipantProcessorWSImpl()) ;
@@ -60,7 +60,7 @@
            }
         };
         // this is the last WST callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WST11);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11);
     }
 
     /**

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -149,6 +149,10 @@
 		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhaseHLSImple.xml"/>
 		<copy file="xml/SagasHLSImple.xml"
 		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/SagasHLSImple.xml"/>
+		<copy file="xml/TwoPhase11HLSImple.xml"
+		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.xml"/>
+		<copy file="xml/Sagas11HLSImple.xml"
+		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.xml"/>
 		<copy file="xml/JTAHLSImple.xml"
 		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/jta/arjunajta/JTAHLSImple.xml"/>
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -43,7 +43,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSCF) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSCF10) {
            public void run() {
                try
                {
@@ -65,7 +65,7 @@
         };
         // this is the last WSCF callback to be initialised so close the list
 
-        Sequencer.close(Sequencer.WEBAPP_WSCF);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSCF10);
     }
 
     /**

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -43,7 +43,7 @@
      */
     public void contextInitialized(final ServletContextEvent servletContextEvent)
     {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSCF11) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11) {
            public void run() {
                try
                {
@@ -66,7 +66,7 @@
            }
         };
         // this is the last WSCF callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WSCF11);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11);
 
     }
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -42,9 +42,11 @@
 {
 
     public static final String PROTOCOL_IMPLEMENTATION = "com.arjuna.mw.wscf.protocolImplementation";
-    public static final String PROTOCOLWS_IMPLEMENTATION = "com.arjuna.mw.wscfws.protocolImplementation";
     public static final String JTA_CONTEXT = "com.arjuna.mw.wscf.protocols.jta.context";
     public static final String TWO_PHASE_CONTEXT = "com.arjuna.mw.wscf.protocols.twophase.context";
     public static final String SAGAS_CONTEXT = "com.arjuna.mw.wscf.protocols.sagas.context";
     
+    public static final String PROTOCOLWS_IMPLEMENTATION = "com.arjuna.mw.wscf11.protocolImplementation";
+    public static final String TWO_PHASEWS_CONTEXT = "com.arjuna.mw.wscf11.protocols.twophase.context";
+    public static final String SAGASWS_CONTEXT = "com.arjuna.mw.wscf11.protocols.sagas.context";
 }

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,162 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf.model.sagas;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.protocols.*;
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple;
+
+/**
+ * The factory to return the specific CoordinatorManager implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class CoordinatorManager11Factory
+{
+
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.sagas.CMF11_1 [com.arjuna.mw.wscf.model.sagas.CMF11_1] - Failed to create
+     */
+
+    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(Sagas11HLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.CMF11_1",
+					      new Object[]{Sagas11HLSImple.className()});
+    }
+	    else
+		return coordinatorManager(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (SagasHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (SagasHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.coordinatorManager();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,161 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf.model.sagas;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+import com.arjuna.mw.wscf.model.sagas.api.UserCoordinator;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.protocols.*;
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple;
+
+/**
+ * The factory which returns the UserCoordinator implementation to use.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class UserCoordinator11Factory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.sagas.UCF11_1 [com.arjuna.mw.wscf.model.sagas.UCF11_1] - Failed to create
+     */
+
+    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(Sagas11HLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.UCF11_1",
+					      new Object[]{Sagas11HLSImple.className()});
+	    }
+	    else
+		return userCoordinator(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (SagasHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (SagasHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.userCoordinator();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,161 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf.model.twophase;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.protocols.*;
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhase11HLSImple;
+
+/**
+ * The factory to return the specific CoordinatorManager implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class CoordinatorManager11Factory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.twophase.CMF11_1 [com.arjuna.mw.wscf.model.twophase.CMF11_1] - Failed to create
+     */
+
+    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(TwoPhase11HLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.CMF11_1",
+					      new Object[]{TwoPhase11HLSImple.className()});
+	    }
+	    else
+		return coordinatorManager(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (TwoPhaseHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (TwoPhaseHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.coordinatorManager();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,161 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf.model.twophase;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.protocols.*;
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple;
+
+/**
+ * The factory which returns the UserCoordinator implementation to use.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class UserCoordinator11Factory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.twophase.UCF11_1 [com.arjuna.mw.wscf.model.twophase.UCF11_1] - Failed to create
+     */
+
+    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(TwoPhaseHLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.UCF11_1",
+					      new Object[]{TwoPhaseHLSImple.className()});
+	    }
+	    else
+		return userCoordinator(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (TwoPhaseHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (TwoPhaseHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.userCoordinator();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,293 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wscf.model.sagas.arjunacore;
+
+import com.arjuna.mw.wscf.model.sagas.api.*;
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+
+import com.arjuna.mw.wscf.common.Environment;
+
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+
+import com.arjuna.mw.wscf.common.Qualifier;
+import com.arjuna.mw.wscf.common.CoordinatorId;
+
+import com.arjuna.mw.wscf.api.UserCoordinatorService;
+
+import com.arjuna.mw.wsas.context.Context;
+
+import com.arjuna.mw.wsas.ActivityManagerFactory;
+
+import com.arjuna.mw.wsas.activity.Outcome;
+import com.arjuna.mw.wsas.activity.HLS;
+
+import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
+import com.arjuna.mw.wsas.exceptions.HLSError;
+
+import com.arjuna.mw.wscf.exceptions.*;
+
+/**
+ * The ArjunaCore coordination service implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
+ * @since 1.0.
+ */
+
+public class Sagas11HLSImple implements SagasHLS, UserCoordinatorService
+{
+
+    public Sagas11HLSImple()
+    {
+	try
+	{
+	    ActivityManagerFactory.activityManager().addHLS((HLS) this);
+	}
+	catch (Exception ex)
+	{
+	    throw new HLSError(ex.toString());
+	}
+
+	_coordinatorService = new CoordinatorServiceImple();
+	_coordManager = new CoordinatorControl();
+    }
+
+    public UserCoordinatorService coordinatorService ()
+    {
+	return this;
+    }
+
+    public UserCoordinator userCoordinator ()
+    {
+	return _coordinatorService;
+    }
+
+    public CoordinatorManager coordinatorManager ()
+    {
+	return _coordinatorService;
+    }
+
+    /**
+     * An activity has begun and is active on the current thread.
+     */
+
+    public void begun () throws SystemException
+    {
+	_coordManager.begin();
+    }
+
+    /**
+     * The current activity is completing with the specified completion status.
+     *
+     * @param CompletionStatus cs The completion status to use.
+     *
+     * @return The result of terminating the relationship of this HLS and
+     * the current activity.
+     */
+
+    public Outcome complete (CompletionStatus cs) throws SystemException
+    {
+	return _coordManager.complete(cs);
+    }
+
+    /**
+     * The activity has been suspended.
+     */
+
+    public void suspended () throws SystemException
+    {
+	_coordManager.suspend();
+    }
+
+    /**
+     * The activity has been resumed on the current thread.
+     */
+
+    public void resumed () throws SystemException
+    {
+	_coordManager.resume();
+    }
+
+    /**
+     * The activity has completed and is no longer active on the current
+     * thread.
+     */
+
+    public void completed () throws SystemException
+    {
+	_coordManager.completed();
+    }
+
+    /**
+     * The HLS name.
+     */
+
+    public String identity () throws SystemException
+    {
+	return "Sagas11HLSImple";
+    }
+
+    /**
+     * The activity service maintains a priority ordered list of HLS
+     * implementations. If an HLS wishes to be ordered based on priority
+     * then it can return a non-negative value: the higher the value,
+     * the higher the priority and hence the earlier in the list of HLSes
+     * it will appear (and be used in).
+     *
+     * @return a positive value for the priority for this HLS, or zero/negative
+     * if the order is not important.
+     */
+
+    public int priority () throws SystemException
+    {
+	return 0;
+    }
+
+    /**
+     * Return the context augmentation for this HLS, if any on the current
+     * activity.
+     *
+     * @param ActivityHierarchy current The handle on the current activity
+     * hierarchy. The HLS may use this when determining what information to
+     * place in its context data.
+     *
+     * @return a context object or null if no augmentation is necessary.
+     */
+
+    /*
+     * TODO This needs refactoring. It's true that the context format should
+     * be configurable to allow the same implementation to be used in
+     * different protocols (e.g., 2PC mapping to OTS or original Arjuna could
+     * use the same protocol implementation, but the context formats are
+     * different.) However, is this the best way of doing that?
+     */
+
+    public Context context () throws SystemException
+    {
+        String contextImple = System.getProperty(Environment.SAGASWS_CONTEXT);
+
+        if (contextImple != null) {
+            try {
+                Class c = Class.forName(contextImple);
+                SOAPContext ctx = (SOAPContext) c.newInstance();
+
+                ctx.initialiseContext(_coordManager.currentCoordinator());
+
+                return ctx;
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                throw new SystemException(ex.toString());
+            }
+        } else {
+            throw new SystemException("SAGAS 1.1 context implementation must be specified by setting environment property " + Environment.SAGASWS_CONTEXT);
+        }
+    }
+
+    /**
+     * If the application requires and if the coordination protocol supports
+     * it, then this method can be used to execute a coordination protocol on
+     * the currently enlisted participants at any time prior to the termination
+     * of the coordination scope.
+     *
+     * This implementation only supports coordination at the end of the
+     * activity.
+     *
+     * @param CompletionStatus cs The completion status to use when determining
+     * how to execute the protocol.
+     *
+     * @exception com.arjuna.mw.wsas.exceptions.WrongStateException Thrown if the coordinator is in a state
+     * the does not allow coordination to occur.
+     * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException Thrown if the protocol is violated
+     * in some manner during execution.
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any other error occurs.
+     *
+     * @return The result of executing the protocol, or null.
+     */
+
+    public Outcome coordinate (CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
+    {
+	return _coordManager.coordinate(cs);
+    }
+
+    /**
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return the status of the current coordinator. If there is no
+     * activity associated with the thread then NoActivity
+     * will be returned.
+     *
+     * @see com.arjuna.mw.wsas.status.Status
+     */
+
+    public com.arjuna.mw.wsas.status.Status status () throws SystemException
+    {
+	return _coordManager.status();
+    }
+
+    /**
+     * Not supported by basic ArjunaCore.
+     *
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return the complete list of qualifiers that have been registered with
+     * the current coordinator.
+     */
+
+    public Qualifier[] qualifiers () throws NoCoordinatorException, SystemException
+    {
+	return _coordManager.qualifiers();
+    }
+
+    /**
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return The unique identity of the current coordinator.
+     */
+
+    public CoordinatorId identifier () throws NoCoordinatorException, SystemException
+    {
+	return _coordManager.identifier();
+    }
+
+    public static String className ()
+    {
+    	return Sagas11HLSImple.class.getName();
+    }
+
+    private CoordinatorControl      _coordManager;
+    private CoordinatorServiceImple _coordinatorService;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,307 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wscf.model.twophase.arjunacore;
+
+import com.arjuna.mw.wscf.model.twophase.api.*;
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+
+import com.arjuna.mw.wscf.common.Environment;
+
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+
+import com.arjuna.mw.wscf.common.Qualifier;
+import com.arjuna.mw.wscf.common.CoordinatorId;
+
+import com.arjuna.mw.wscf.api.UserCoordinatorService;
+
+import com.arjuna.mw.wsas.context.Context;
+
+import com.arjuna.mw.wsas.ActivityManagerFactory;
+
+import com.arjuna.mw.wsas.activity.Outcome;
+import com.arjuna.mw.wsas.activity.HLS;
+
+import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
+import com.arjuna.mw.wsas.exceptions.HLSError;
+
+import com.arjuna.mw.wscf.exceptions.*;
+
+/**
+ * The ArjunaCore coordination service implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
+ * @since 1.0.
+ */
+
+public class TwoPhase11HLSImple implements TwoPhaseHLS, UserCoordinatorService
+{
+
+	public TwoPhase11HLSImple()
+	{
+		try
+		{
+			ActivityManagerFactory.activityManager().addHLS((HLS) this);
+		}
+		catch (Exception ex)
+		{
+			throw new HLSError(ex.toString());
+		}
+
+		_coordinatorService = new CoordinatorServiceImple();
+		_coordManager = new CoordinatorControl();
+	}
+
+	public UserCoordinatorService coordinatorService ()
+	{
+		return this;
+	}
+
+	public UserCoordinator userCoordinator ()
+	{
+		return _coordinatorService;
+	}
+
+	public CoordinatorManager coordinatorManager ()
+	{
+		return _coordinatorService;
+	}
+
+	/**
+	 * An activity has begun and is active on the current thread.
+	 */
+
+	public void begun () throws SystemException
+	{
+		_coordManager.begin();
+	}
+
+	/**
+	 * The current activity is completing with the specified completion status.
+	 *
+	 * @param CompletionStatus
+	 *            cs The completion status to use.
+	 *
+	 * @return The result of terminating the relationship of this HLS and the
+	 *         current activity.
+	 */
+
+	public Outcome complete (CompletionStatus cs) throws SystemException
+	{
+		return _coordManager.complete(cs);
+	}
+
+	/**
+	 * The activity has been suspended.
+	 */
+
+	public void suspended () throws SystemException
+	{
+		_coordManager.suspend();
+	}
+
+	/**
+	 * The activity has been resumed on the current thread.
+	 */
+
+	public void resumed () throws SystemException
+	{
+		_coordManager.resume();
+	}
+
+	/**
+	 * The activity has completed and is no longer active on the current thread.
+	 */
+
+	public void completed () throws SystemException
+	{
+		_coordManager.completed();
+	}
+
+	/**
+	 * The HLS name.
+	 */
+
+	public String identity () throws SystemException
+	{
+		return "TwoPhaseHLSImple";
+	}
+
+	/**
+	 * The activity service maintains a priority ordered list of HLS
+	 * implementations. If an HLS wishes to be ordered based on priority then it
+	 * can return a non-negative value: the higher the value, the higher the
+	 * priority and hence the earlier in the list of HLSes it will appear (and
+	 * be used in).
+	 *
+	 * @return a positive value for the priority for this HLS, or zero/negative
+	 *         if the order is not important.
+	 */
+
+	public int priority () throws SystemException
+	{
+		return 0;
+	}
+
+	/**
+	 * Return the context augmentation for this HLS, if any on the current
+	 * activity.
+	 *
+	 * @param ActivityHierarchy
+	 *            current The handle on the current activity hierarchy. The HLS
+	 *            may use this when determining what information to place in its
+	 *            context data.
+	 *
+	 * @return a context object or null if no augmentation is necessary.
+	 */
+
+	/*
+	 * TODO This needs refactoring. It's true that the context format should be
+	 * configurable to allow the same implementation to be used in different
+	 * protocols (e.g., 2PC mapping to OTS or original Arjuna could use the same
+	 * protocol implementation, but the context formats are different.) However,
+	 * is this the best way of doing that?
+	 */
+
+	public Context context () throws SystemException
+	{
+		String contextImple = System.getProperty(Environment.TWO_PHASE_CONTEXT);
+
+		if (contextImple != null)
+		{
+			try
+			{
+				Class c = Class.forName(contextImple);
+				SOAPContext ctx = (SOAPContext) c.newInstance();
+
+				ctx.initialiseContext(_coordManager.currentCoordinator());
+
+				return ctx;
+			}
+			catch (Exception ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			return new com.arjuna.mwlabs.wscf.model.twophase.arjunacore.context.soap.ArjunaContextImple(
+					_coordManager.currentCoordinator());
+	}
+
+	/**
+	 * If the application requires and if the coordination protocol supports it,
+	 * then this method can be used to execute a coordination protocol on the
+	 * currently enlisted participants at any time prior to the termination of
+	 * the coordination scope.
+	 *
+	 * This implementation only supports coordination at the end of the
+	 * activity.
+	 *
+	 * @param CompletionStatus
+	 *            cs The completion status to use when determining how to
+	 *            execute the protocol.
+	 *
+	 * @exception com.arjuna.mw.wsas.exceptions.WrongStateException
+	 *                Thrown if the coordinator is in a state the does not allow
+	 *                coordination to occur.
+	 * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException
+	 *                Thrown if the protocol is violated in some manner during
+	 *                execution.
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any other error occurs.
+	 *
+	 * @return The result of executing the protocol, or null.
+	 */
+
+	public Outcome coordinate (CompletionStatus cs) throws WrongStateException,
+			ProtocolViolationException, SystemException
+	{
+		return _coordManager.coordinate(cs);
+	}
+
+	/**
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return the status of the current coordinator. If there is no activity
+	 *         associated with the thread then NoActivity will be returned.
+	 *
+	 * @see com.arjuna.mw.wsas.status.Status
+	 */
+
+	public com.arjuna.mw.wsas.status.Status status () throws SystemException
+	{
+		return _coordManager.status();
+	}
+
+	/**
+	 * Not supported by basic ArjunaCore.
+	 *
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return the complete list of qualifiers that have been registered with
+	 *         the current coordinator.
+	 */
+
+	public Qualifier[] qualifiers () throws NoCoordinatorException,
+			SystemException
+	{
+		return _coordManager.qualifiers();
+	}
+
+	/**
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return The unique identity of the current coordinator.
+	 */
+
+	public CoordinatorId identifier () throws NoCoordinatorException,
+			SystemException
+	{
+		return _coordManager.identifier();
+	}
+
+	public static String className ()
+	{
+		return TwoPhaseHLSImple.class.getName();
+	}
+
+	private CoordinatorControl _coordManager;
+	private CoordinatorServiceImple _coordinatorService;
+
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -54,7 +54,7 @@
 
 	try
 	{
-	    com.arjuna.mw.wsas.utils.Configuration.initialise("/wscf.xml");
+	    com.arjuna.mw.wsas.utils.Configuration.initialise("/wscf11.xml");
 	}
 	catch (java.io.FileNotFoundException ex)
 	{

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -38,13 +38,6 @@
 	    name="com.arjuna.mw.wscf.protocolImplementation4"
 	    value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
 
-        <property
-        name="com.arjuna.mw.wscfws.protocolImplementation1"
-        value="com.arjuna.mwlabs.wst.at.ContextFactoryWSImple"/>
-        <property
-        name="com.arjuna.mw.wscfws.protocolImplementation2"
-        value="com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple"/>
-
 	    <property
 	    name="com.arjuna.ats.arjuna.objectstore.objectStoreDir"
 	    value="XTSObjectStore"/>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -21,28 +21,21 @@
 
 <wscf-config>
 	<properties>
-	    <property name="com.arjuna.mw.wsas.deploymentContext"
-	    value="com.arjuna.mwlabs.wst.at.context.DeploymentContextImple"/>
-	    <property name="com.arjuna.mw.wscf.protocols.twophase.context"
-	    value="com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple"/>
+        <property name="com.arjuna.mw.wscf11.protocols.twophase.context"
+        value="com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple"/>
+        <property name="com.arjuna.mw.wscf11.protocols.sagas.context"
+        value="com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple"/>
 	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation1"
-	    value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple"/>
+	    name="com.arjuna.mw.wscf11.protocolImplementation1"
+	    value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhase11HLSImple"/>
 	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation2"
-	    value="com.arjuna.mwlabs.wst.at.ContextFactoryImple"/>
-	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation3"
-	    value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.SagasHLSImple"/>
-	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation4"
-	    value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
-
+	    name="com.arjuna.mw.wscf11.protocolImplementation2"
+	    value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple"/>
         <property
-        name="com.arjuna.mw.wscfws.protocolImplementation1"
+        name="com.arjuna.mw.wscf11.protocolImplementation3"
         value="com.arjuna.mwlabs.wst.at.ContextFactoryWSImple"/>
         <property
-        name="com.arjuna.mw.wscfws.protocolImplementation2"
+        name="com.arjuna.mw.wscf11.protocolImplementation4"
         value="com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple"/>
 
 	    <property

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/Sagas11HLSImple.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/Sagas11HLSImple.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/Sagas11HLSImple.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,23 @@
+<!--
+  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 
+  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 
+  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, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<coordination-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\mlittle\Desktop\standards work\WS architecture\WSCF\0.8.2\xml\WSCF.xsd">
+<coordinator-type>urn:tx-sagas11-commit</coordinator-type>
+</coordination-type>

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/TwoPhase11HLSImple.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/TwoPhase11HLSImple.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/TwoPhase11HLSImple.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,23 @@
+<!--
+  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 
+  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 
+  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, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<coordination-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\mlittle\Desktop\standards work\WS architecture\WSCF\0.8.2\xml\WSCF.xsd">
+<coordinator-type>urn:tx-two-phase11-commit</coordinator-type>
+</coordination-type>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -138,6 +138,11 @@
             <attribute name="Class-Path" value="${com.arjuna.mwlabs.ts.modulename}.jar"/>
         </manifest>
 	  </war>
+	  <war warfile="${com.arjuna.mwlabs.wstx.war.dest}/${com.arjuna.mwlabs.ts.modulename}11.war" webxml="xml/wstx_web-app11.xml">
+        <manifest>
+            <attribute name="Class-Path" value="${com.arjuna.mwlabs.ts.modulename}.jar"/>
+        </manifest>
+	  </war>
 	</target>
 
 	<!-- Jar targets -->

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,128 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wst.*;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * As with UserTransaction a TransactionManager does not represent a specific
+ * transaction, but rather is responsible for providing access to an implicit
+ * per-thread transaction context.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class BusinessActivity11Manager
+{
+    /**
+     * The manager.
+     */
+    private static BusinessActivity11Manager MANAGER ;
+    
+    /**
+     * Get the business activity manager.
+     * @return The business activity manager.
+     */
+    public static synchronized BusinessActivity11Manager getBusinessActivityManager()
+    {
+        return MANAGER ;
+    }
+    
+    /**
+     * Set the business activity manager.
+     * @param manager The business activity manager.
+     */
+    public static synchronized void setBusinessActivityManager(final BusinessActivity11Manager manager)
+    {
+        MANAGER = manager ;
+    }
+
+    /**
+     * Enlist a participant for the BusinessAgreement protocol.
+     *
+     * @return the BAParticipantManager for this transaction.
+     */
+    public abstract BAParticipantManagerWS enlistForBusinessAgreementWithParticipantCompletion(
+        final BusinessAgreementWithParticipantCompletionParticipant bap, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * Enlist a participant for the BusinessAgreementWithCoordinatorCompletion protocol.
+     *
+     * @return the BAParticipantManager for this transaction.
+     */
+    public abstract BAParticipantManagerWS enlistForBusinessAgreementWithCoordinatorCompletion(
+        final BusinessAgreementWithCoordinatorCompletionParticipant bawcp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * The resume method can be used to (re-)associate a thread with a 
+     * transaction(s) via its TxContext. Prior to association, the thread is
+     * disassociated with any transaction(s) with which it may be currently
+     * associated. If the TxContext is null, then the thread is associated with
+     * no transaction. The UnknownTransactionException exception is thrown if
+     * the transaction that the TxContext refers to is invalid in the scope of
+     * the invoking thread.
+     */
+    public abstract void resume(final TxContext txContext)
+        throws UnknownTransactionException, SystemException;
+
+    /**
+     * A thread of control may require periods of non-transactionality so that
+     * it may perform work that is not associated with a specific transaction.
+     * In order to do this it is necessary to disassociate the thread from any
+     * transactions. The suspend method accomplishes this, returning a
+     * TxContext instance, which is a handle on the transaction. The thread is
+     * then no longer associated with any transaction.
+     */
+    public abstract TxContext suspend()
+        throws SystemException;
+    
+    /**
+     * The currentTransaction method returns the TxContext for the current
+     * transaction, or null if there is none. Unlike suspend, this method does
+     * not disassociate the current thread from the transaction(s). This can
+     * be used to enable multiple threads to execute within the scope of the
+     * same transaction.
+     */
+    public abstract TxContext currentTransaction()
+        throws SystemException;
+    
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,41 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManagerFactory.java,v 1.4.8.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+
+public class BusinessActivityManager11Factory
+{
+    public static BusinessActivity11Manager businessActivityManager ()
+    {
+        return BusinessActivity11Manager.getBusinessActivityManager() ;
+	}
+}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerFactoryWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerFactoryWS.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerFactoryWS.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,41 +0,0 @@
-/*
- * 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 
- * 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 
- * 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, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2003,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: BusinessActivityManagerFactory.java,v 1.4.8.1 2005/11/22 10:36:06 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-
-public class BusinessActivityManagerFactoryWS
-{
-    public static BusinessActivityManagerWS businessActivityManager ()
-    {
-        return BusinessActivityManagerWS.getBusinessActivityManager() ;
-	}
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerWS.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManagerWS.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,128 +0,0 @@
-/*
- * 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 
- * 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 
- * 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, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2003,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-import com.arjuna.wsc.AlreadyRegisteredException;
-import com.arjuna.wst.*;
-
-/**
- * This is the interface that the core exposes in order to allow different
- * types of participants to be enrolled. The messaging layer continues to
- * work in terms of the registrar, but internally we map to one of these
- * methods.
- *
- * As with UserTransaction a TransactionManager does not represent a specific
- * transaction, but rather is responsible for providing access to an implicit
- * per-thread transaction context.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
- * @since XTS 1.0.
- */
-
-public abstract class BusinessActivityManagerWS
-{
-    /**
-     * The manager.
-     */
-    private static BusinessActivityManagerWS MANAGER ;
-    
-    /**
-     * Get the business activity manager.
-     * @return The business activity manager.
-     */
-    public static synchronized BusinessActivityManagerWS getBusinessActivityManager()
-    {
-        return MANAGER ;
-    }
-    
-    /**
-     * Set the business activity manager.
-     * @param manager The business activity manager.
-     */
-    public static synchronized void setBusinessActivityManager(final BusinessActivityManagerWS manager)
-    {
-        MANAGER = manager ;
-    }
-
-    /**
-     * Enlist a participant for the BusinessAgreement protocol.
-     *
-     * @return the BAParticipantManager for this transaction.
-     */
-    public abstract BAParticipantManagerWS enlistForBusinessAgreementWithParticipantCompletion(
-        final BusinessAgreementWithParticipantCompletionParticipant bap, final String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
-
-    /**
-     * Enlist a participant for the BusinessAgreementWithCoordinatorCompletion protocol.
-     *
-     * @return the BAParticipantManager for this transaction.
-     */
-    public abstract BAParticipantManagerWS enlistForBusinessAgreementWithCoordinatorCompletion(
-        final BusinessAgreementWithCoordinatorCompletionParticipant bawcp, final String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
-
-    /**
-     * The resume method can be used to (re-)associate a thread with a 
-     * transaction(s) via its TxContext. Prior to association, the thread is
-     * disassociated with any transaction(s) with which it may be currently
-     * associated. If the TxContext is null, then the thread is associated with
-     * no transaction. The UnknownTransactionException exception is thrown if
-     * the transaction that the TxContext refers to is invalid in the scope of
-     * the invoking thread.
-     */
-    public abstract void resume(final TxContext txContext)
-        throws UnknownTransactionException, SystemException;
-
-    /**
-     * A thread of control may require periods of non-transactionality so that
-     * it may perform work that is not associated with a specific transaction.
-     * In order to do this it is necessary to disassociate the thread from any
-     * transactions. The suspend method accomplishes this, returning a
-     * TxContext instance, which is a handle on the transaction. The thread is
-     * then no longer associated with any transaction.
-     */
-    public abstract TxContext suspend()
-        throws SystemException;
-    
-    /**
-     * The currentTransaction method returns the TxContext for the current
-     * transaction, or null if there is none. Unlike suspend, this method does
-     * not disassociate the current thread from the transaction(s). This can
-     * be used to enable multiple threads to execute within the scope of the
-     * same transaction.
-     */
-    public abstract TxContext currentTransaction()
-        throws SystemException;
-    
-}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,141 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.wst.*;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * This could also be the interface that high-level users see (e.g., at the
+ * application Web Service).
+ *
+ * As with UserTransaction a TransactionManager does not represent a specific
+ * transaction, but rather is responsible for providing access to an implicit
+ * per-thread transaction context.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class TransactionManager11
+{
+    /**
+     * The manager.
+     */
+    private static TransactionManager11 TRANSACTION_MANAGER ;
+
+    /**
+     * Get the transaction manager.
+     * @return The transaction manager.
+     */
+    public static synchronized TransactionManager11 getTransactionManager()
+    {
+        return TRANSACTION_MANAGER ;
+    }
+
+    /**
+     * Set the transaction manager.
+     * @param manager The transaction manager.
+     */
+    public static synchronized void setTransactionManager(final TransactionManager11 manager)
+    {
+        TRANSACTION_MANAGER = manager ;
+    }
+
+    /**
+     * Enlist the specified participant with current transaction such that it
+     * will participate in the Volatile 2PC protocol; a unique identifier for
+     * the participant is also required. If there is no transaction associated
+     * with the invoking thread then the UnknownTransactionException exception
+     * is thrown. If the coordinator already has a participant enrolled with
+     * the same identifier, then AlreadyRegisteredException will be thrown. If
+     * the transaction is not in a state where participants can be enrolled
+     * (e.g., it is terminating) then WrongStateException will be thrown.
+     */
+    public abstract void enlistForVolatileTwoPhase(final Volatile2PCParticipant pzp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * Enlist the specified participant with current transaction such that it
+     * will participate in the 2PC protocol; a unique identifier for the
+     * participant is also required. If there is no transaction associated with
+     * the invoking thread then the UnknownTransactionException exception is
+     * thrown. If the coordinator already has a participant enrolled with the
+     * same identifier, then AlreadyRegisteredException will be thrown. If the
+     * transaction is not in a state where participants can be enrolled (e.g.,
+     * it is terminating) then WrongStateException will be thrown.
+     */
+    public abstract void enlistForDurableTwoPhase(final Durable2PCParticipant tpp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    public abstract int replay () throws SystemException;
+
+    /**
+     * The resume method can be used to (re-)associate a thread with a
+     * transaction(s) via its TxContext. Prior to association, the thread is
+     * disassociated with any transaction(s) with which it may be currently
+     * associated. If the TxContext is null, then the thread is associated with
+     * no transaction. The UnknownTransactionException exception is thrown if
+     * the transaction that the TxContext refers to is invalid in the scope of
+     * the invoking thread.
+     */
+    public abstract void resume(final TxContext txContext)
+        throws UnknownTransactionException, SystemException;
+
+    /**
+     * A thread of control may require periods of non-transactionality so that
+     * it may perform work that is not associated with a specific transaction.
+     * In order to do this it is necessary to disassociate the thread from any
+     * transactions. The suspend method accomplishes this, returning a
+     * TxContext instance, which is a handle on the transaction. The thread is
+     * then no longer associated with any transaction.
+     */
+    public abstract TxContext suspend()
+        throws SystemException;
+
+    /**
+     * The currentTransaction method returns the TxContext for the current
+     * transaction, or null if there is none. Unlike suspend, this method does
+     * not disassociate the current thread from the transaction(s). This can
+     * be used to enable multiple threads to execute within the scope of the
+     * same transaction.
+     */
+    public abstract TxContext currentTransaction()
+        throws SystemException;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,41 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TransactionManagerFactory.java,v 1.8.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+
+public class TransactionManager11Factory
+{
+    public static TransactionManager11 transactionManager ()
+    {
+    	return TransactionManager11.getTransactionManager() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,126 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that allows BAs to be started and terminated.
+ * The messaging layer converts the messages into calls on this.
+ *
+ * Importantly, a UserBusinessActivity does not represent a specific
+ * transaction, but rather is responsible for providing access to an implicit
+ * per-thread  transaction context; it is similar to the UserTransaction in
+ * the JTA specification. Therefore, all of the UserTransaction methods
+ * implicitly act on the current thread of control.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class UserBusinessActivity11
+{
+    /**
+     * The user business activity.
+     */
+    private static UserBusinessActivity11 USER_BUSINESS_ACTIVITY ;
+
+    /**
+     * Get the user business activity.
+     * @return The user business activity.
+     */
+    public static synchronized UserBusinessActivity11 getUserBusinessActivity()
+    {
+        return USER_BUSINESS_ACTIVITY ;
+    }
+
+    /**
+     * Set the user business activity.
+     * @param userBusinessActivity The user business activity.
+     */
+    public static synchronized void setUserBusinessActivity(final UserBusinessActivity11 userBusinessActivity)
+    {
+        USER_BUSINESS_ACTIVITY = userBusinessActivity ;
+    }
+
+    public static final int ATOMIC_OUTCOME = 0;
+    public static final int MIXED_OUTCOME = 1;
+
+    /**
+     * Start a new business activity with atomic outcome.
+     * If one is already associated with this thread
+     * then the WrongStateException will be thrown. Upon success, this
+     * operation associates the newly created transaction with the current
+     * thread.
+     */
+    public abstract void begin()
+        throws WrongStateException, SystemException;
+
+    /**
+     * Start a new BA with atomic outcome and the specified timeout as
+     * its lifetime.
+     * If one is already associated with this thread then the
+     * WrongStateException will be thrown.
+     */
+    public abstract void begin(final int timeout)
+        throws WrongStateException, SystemException;
+
+    /**
+     * The BA is normally terminated by the close method. This signals to
+     * all registered participants that the BA has ended and no compensation
+     * is required.
+     */
+    public abstract void close()
+        throws TransactionRolledBackException, UnknownTransactionException, SystemException;
+
+    /**
+     * If the BA must undo its work then the cancel method is used. Any
+     * participants that can compensate are forced to do so.
+     */
+    public abstract void cancel()
+        throws UnknownTransactionException, SystemException;
+
+    /**
+     * If participants have registered for the BusinessAgreementWithComplete
+     * protocol then they will be expecting the application to inform them
+     * when all work intended for them has been sent (and responded to). The
+     * complete method is used for this purpose.
+     */
+    public abstract void complete()
+        throws UnknownTransactionException, SystemException;
+
+    public abstract String transactionIdentifier();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,42 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserBusinessActivityFactory.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.mw.wst.UserBusinessActivity;
+
+public class UserBusinessActivity11Factory
+{
+    public static UserBusinessActivity11 userBusinessActivity ()
+    {
+        return UserBusinessActivity11.getUserBusinessActivity() ;
+	}
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,118 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that allows transactions to be started and terminated.
+ * The messaging layer converts the Commit, Rollback and Notify messages into
+ * calls on this.
+ * Importantly, a UserTransaction does not represent a specific transaction,
+ * but rather is responsible for providing access to an implicit per-thread
+ * transaction context; it is similar to the UserTransaction in the JTA
+ * specification. Therefore, all of the UserTransaction methods implicitly act
+ * on the current thread of control.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class UserTransaction11
+{
+    /**
+     * The transaction.
+     */
+    private static UserTransaction11 USER_TRANSACTION ;
+
+    /**
+     * Get the user transaction.
+     * @return the user transaction.
+     */
+    public static synchronized UserTransaction11 getUserTransaction()
+    {
+        return USER_TRANSACTION ;
+    }
+
+    /**
+     * Set the user transaction.
+     * @param userTransaction The user transaction.
+     */
+    public static synchronized void setUserTransaction(final UserTransaction11 userTransaction)
+    {
+        USER_TRANSACTION = userTransaction ;
+    }
+
+    /**
+     * Start a new transaction. If one is already associated with this thread
+     * then the WrongStateException will be thrown. Upon success, this
+     * operation associates the newly created transaction with the current
+     * thread.
+     */
+    public abstract void begin()
+        throws WrongStateException, SystemException;
+
+    /**
+     * Start a new transaction with the specified timeout as its lifetime.
+     * If one is already associated with this thread then the
+     * WrongStateException will be thrown.
+     */
+    public abstract void begin(final int timeout)
+        throws WrongStateException, SystemException;
+
+    /**
+     * The transaction is committed by the commit method. This will execute
+     * the PhaseZero, 2PC and OutcomeNotification protocols prior to returning.
+     * If there is no transaction associated with the invoking thread then
+     * UnknownTransactionException is thrown. If the transaction ultimately
+     * rolls back then the TransactionRolledBackException is thrown. When
+     * complete, this operation disassociates the transaction from the current
+     * thread such that it becomes associated with no transaction.
+     */
+    public abstract void commit()
+        throws TransactionRolledBackException, UnknownTransactionException, SecurityException, SystemException;
+
+    /**
+     * The rollback operation will terminate the transaction and return
+     * normally if it succeeded, while throwing an appropriate exception if it
+     * didn't. If there is no transaction associated with the invoking thread
+     * then UnknownTransactionException is thrown.
+     */
+    public abstract void rollback()
+        throws UnknownTransactionException, SecurityException, SystemException;
+
+    public abstract String transactionIdentifier ();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,41 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserTransactionFactory.java,v 1.9.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+
+public class UserTransaction11Factory
+{
+    public static UserTransaction11 userTransaction ()
+    {
+        return UserTransaction11.getUserTransaction() ;
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -27,7 +27,6 @@
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
 import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstants;
 import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
 import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
 
@@ -62,7 +61,7 @@
              * associated with the thread.
              */
             final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
-            final BusinessActivityManagerWS businessActivityManager = BusinessActivityManagerFactoryWS.businessActivityManager() ;
+            final BusinessActivity11Manager businessActivityManager = BusinessActivityManager11Factory.businessActivityManager() ;
 
             final ContextWS atContext ;
             if (transactionManager != null)
@@ -160,7 +159,7 @@
                         else if (BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
                         {
                             final TxContext txContext = new com.arjuna.mwlabs.wst.ba.context.TxContextWSImple(cc);
-                            BusinessActivityManagerFactoryWS.businessActivityManager().resume(txContext) ;
+                            BusinessActivityManager11Factory.businessActivityManager().resume(txContext) ;
                         }
                         else
                         {

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXInitialisation.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -23,7 +23,6 @@
 import com.arjuna.mw.wsas.utils.Configuration;
 import com.arjuna.mw.wst.*;
 import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.ba.remote.BusinessActivityManagerWSImple;
 import com.arjuna.services.framework.startup.Sequencer;
 import com.arjuna.webservices.util.ClassLoaderHelper;
 import org.w3c.dom.Document;
@@ -60,7 +59,7 @@
     {
         final WSTXInitialisation listener = this;
 
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.WEBAPP_WSTX) {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSTX10) {
            public void run() {
                try
                {
@@ -81,7 +80,7 @@
            }
         };
         // this is the last WST callback to be initialised so close the list
-        Sequencer.close(Sequencer.WEBAPP_WSTX);
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WSTX10);
     }
     
     /**
@@ -127,8 +126,6 @@
         TransactionManager.setTransactionManager((TransactionManager)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
         UserBusinessActivity.setUserBusinessActivity((UserBusinessActivity)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
         BusinessActivityManager.setBusinessActivityManager((BusinessActivityManager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
-        // we only have one choice for the 1.1 business activity manager
-        BusinessActivityManagerWS.setBusinessActivityManager(BusinessActivityManagerWSImple.class.newInstance());
     }
 
     /**

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,197 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.mw.wst.deploy;
+
+import com.arjuna.mw.wsas.utils.Configuration;
+import com.arjuna.mw.wst.*;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices.util.ClassLoaderHelper;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+
+/**
+ * Initialise WSTX.
+ * @author kevin
+ */
+public class WSTXWSInitialisation implements ServletContextListener
+{
+    /**
+     * The name of the WS-T configuration.
+     */
+    private static final String WS_T11_CONFIG = "/wst11.xml" ;
+
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     *
+     * @message com.arjuna.mw.wst.deploy.WSTXWSI_1 [com.arjuna.mw.wst.deploy.WSTXWSI_1] - WSTX Initialisation: init failed:
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final WSTXWSInitialisation listener = this;
+
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11) {
+           public void run() {
+               try
+               {
+                   Configuration.initialise("/wstx11.xml");
+
+                   listener.configure();
+                   // Start recovery
+//            RecoveryManager.manager() ;
+               }
+               catch (Exception exception)
+               {
+                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTXWSI_1", exception);
+               }
+               catch (Error error)
+               {
+                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTXWSI_21", error);
+               }
+           }
+        };
+        // this is the last WST callback to be initialised so close the list
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11);
+    }
+
+    /**
+     * Configure WS-T.
+     *
+     * @message com.arjuna.mw.wst.deploy.WSTXWSI_21 [com.arjuna.mw.wst.deploy.WSTXWSI_21] - {0} not found.
+     * @message com.arjuna.mw.wst.deploy.WSTXWSI_22 [com.arjuna.mw.wst.deploy.WSTXWSI_22] - Failed to create document: {0}
+     * @message com.arjuna.mw.wst.deploy.WSTXWSI_23 [com.arjuna.mw.wst.deploy.WSTXWSI_23] - Missing WSTX Initialisation
+     */
+    private void configure()
+        throws Exception
+    {
+        // mostly original JNDI binder code.  Should be tidied up.
+        final InputStream is = ClassLoaderHelper.getResourceAsStream(getClass(), WS_T11_CONFIG) ;
+
+        if (is == null)
+        {
+            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_21") ;
+            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
+        }
+
+        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
+        final DocumentBuilder builder = factory.newDocumentBuilder() ;
+        final Document doc = builder.parse(is);
+
+        if (doc == null)
+        {
+            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_22") ;
+            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
+        }
+
+        final Element docElem = doc.getDocumentElement() ;
+        final String userTx = getService(docElem, "UserTransaction") ;
+        final String txManager = getService(docElem, "TransactionManager") ;
+        final String userBa = getService(docElem, "UserBusinessActivity") ;
+        final String baManager = getService(docElem, "BusinessActivityManager") ;
+
+        if ((userTx == null) || (txManager == null) || (userBa == null) || (baManager == null))
+        {
+            throw new FileNotFoundException(wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_23"));
+        }
+        UserTransaction11.setUserTransaction((UserTransaction11)ClassLoaderHelper.forName(getClass(), userTx).newInstance()) ;
+        TransactionManager11.setTransactionManager((TransactionManager11)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
+        UserBusinessActivity11.setUserBusinessActivity((UserBusinessActivity11)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
+        // we only have one choice for the 1.1 business activity manager
+        // BusinessActivity11Manager.setBusinessActivityManager(BusinessActivity11ManagerImple.class.newInstance());
+        BusinessActivity11Manager.setBusinessActivityManager((BusinessActivity11Manager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
+    }
+
+    /**
+     * Get the specified service.
+     * @param root The root element.
+     * @param name The name of the service.
+     * @return The service name or null if not present.
+     */
+    private static String getService(final Node root, final String name)
+    {
+        final NodeList children = root.getChildNodes();
+
+        for (int i = 0; i < children.getLength(); i++)
+        {
+            final Node item = children.item(i) ;
+
+            if ("service".equals(item.getNodeName()))
+            {
+                final Element type = (Element)item;
+
+                if (name.equals(type.getAttribute("name")))
+                {
+                    return getImplementation(type);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Get the specified service.
+     * @param service The service element.
+     * @return The service name or null if not present.
+     */
+    private static String getImplementation(final Node service)
+    {
+        final NodeList children = service.getChildNodes();
+
+        for (int i = 0; i < children.getLength(); i++)
+        {
+            final Node item = children.item(i);
+
+            if ("parameter".equals(item.getNodeName()))
+            {
+                final Element type = (Element)item;
+
+                if ("className".equals(type.getAttribute("name")))
+                {
+                    return type.getAttribute("value");
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+//        RecoveryManager.manager().stop() ;
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -33,7 +33,7 @@
 
 import com.arjuna.mw.wsas.exceptions.NoActivityException;
 import com.arjuna.mw.wsas.exceptions.SystemException;
-import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManager11Factory;
 import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wscf.coordinator.LocalFactory;
@@ -68,7 +68,7 @@
 	{
 		try
 		{
-			_coordManager = CoordinatorManagerFactory.coordinatorManager();
+			_coordManager = CoordinatorManager11Factory.coordinatorManager();
 
             _theRegistrar = new RegistrarWSImple();
 		}

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -4,7 +4,7 @@
 import com.arjuna.mw.wsas.activity.ActivityHierarchy;
 import com.arjuna.mw.wsas.exceptions.SystemException;
 import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManager11Factory;
 import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator;
@@ -31,7 +31,7 @@
 	public RegistrarWSImple()
         throws ProtocolNotRegisteredException, SystemException
     {
-		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+		_coordManager = CoordinatorManager11Factory.coordinatorManager();
 
 		// register with mapper using tx id as protocol identifier.
         final RegistrarMapperWS mapper = RegistrarMapperWS.getFactory() ;

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,13 +1,12 @@
 package com.arjuna.mwlabs.wst.at.remote;
 
-import com.arjuna.mw.wst.TransactionManager;
+import com.arjuna.mw.wst.TransactionManager11;
 import com.arjuna.mw.wst.TxContext;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wst.at.context.TxContextWSImple;
 import com.arjuna.webservices.ServiceRegistryWS;
 import com.arjuna.webservices.SoapFault;
 import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
 import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
 import com.arjuna.webservices.wsat.processors.ParticipantProcessorWS;
 import com.arjuna.wsc.*;
@@ -26,7 +25,7 @@
  * terms of the registrar, but internally we map to one of these methods.
  */
 
-public class TransactionManagerWSImple extends TransactionManager
+public class TransactionManagerWSImple extends TransactionManager11
 {
 	public TransactionManagerWSImple()
 	{

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,7 +1,7 @@
 package com.arjuna.mwlabs.wst.at.remote;
 
-import com.arjuna.mw.wst.TransactionManager;
-import com.arjuna.mw.wst.UserTransaction;
+import com.arjuna.mw.wst.TransactionManager11;
+import com.arjuna.mw.wst.UserTransaction11;
 import com.arjuna.mw.wst.common.Environment;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wst.at.ContextWSImple;
@@ -31,7 +31,7 @@
  *          [com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple__2] - Received
  *          context is null!
  */
-public class UserTransactionWSImple extends UserTransaction
+public class UserTransactionWSImple extends UserTransaction11
 {
 
 	public UserTransactionWSImple()
@@ -163,7 +163,7 @@
 	{
 		try
 		{
-			TransactionManagerWSImple tm = (TransactionManagerWSImple) TransactionManager.getTransactionManager();
+			TransactionManagerWSImple tm = (TransactionManagerWSImple) TransactionManager11.getTransactionManager();
 
             final TxContextWSImple txContext = (TxContextWSImple) tm.currentTransaction();
             final String id = txContext.identifier();

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,21 +1,23 @@
 package com.arjuna.mwlabs.wst.ba;
 
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
 import com.arjuna.wst.BusinessActivityTerminatorWS;
 import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
 
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
 
 /**
  * Local business activity terminator which can be used to close a business activity from the terminator
  * side.
  */
 public class BusinessActivityTerminatorWSImple
-        extends BusinessActivityTerminatorImple
         implements BusinessActivityTerminatorWS
 {
     private W3CEndpointReference participantEndpoint;
@@ -28,11 +30,168 @@
     public BusinessActivityTerminatorWSImple()
             throws SystemException
     {
-        super();
+        try
+        {
+            _coordManager = CoordinatorManager11Factory.coordinatorManager();
+            _hier = _coordManager.currentActivity();
+        }
+        catch (ProtocolNotRegisteredException pnre)
+        {
+            throw new SystemException(pnre.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+
         participantEndpoint = null;
     }
 
+    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+        try
+        {
+            if (_hier == null)
+            throw new UnknownTransactionException();
+
+            _coordManager.resume(_hier);
+
+            _coordManager.close();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+        {
+            throw new UnknownTransactionException();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorCancelledException ex)
+        {
+            throw new TransactionRolledBackException();
+        }
+        catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+        {
+            throw new UnknownTransactionException();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (UnknownTransactionException ex)
+        {
+            throw ex;
+        }
+        finally
+        {
+            TerminationCoordinatorProcessorWS.getProcessor().deactivateParticipant(this) ;
+        }
+    }
+
+    public void cancel () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+
+	    _coordManager.resume(_hier);
+
+	    _coordManager.cancel();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorConfirmedException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (UnknownTransactionException ex)
+	{
+	    throw ex;
+	}
+	finally
+	{
+        TerminationCoordinatorProcessorWS.getProcessor().deactivateParticipant(this) ;
+	}
+    }
+
     /**
+     * Complete doesn't mean go away, it just means that all work you need to
+     * accomplish the commit/rollback has been received.
+     */
+
+    public void complete () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+
+	    _coordManager.resume(_hier);
+
+	    _coordManager.complete();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (UnknownTransactionException ex)
+	{
+	    throw ex;
+	}
+    }
+
+    /**
      * update the business activity terminator with an endpoint supplied at registration time
      *
      * @param participantEndpoint
@@ -51,4 +210,7 @@
     {
         return participantEndpoint;
     }
+
+    private CoordinatorManager _coordManager = null;
+    private ActivityHierarchy _hier = null;
 }

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -31,7 +31,7 @@
 
 package com.arjuna.mwlabs.wst.ba;
 
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
 import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple;
@@ -57,7 +57,7 @@
     {
         try
         {
-            _coordManager = CoordinatorManagerFactory.coordinatorManager();
+            _coordManager = CoordinatorManager11Factory.coordinatorManager();
 
             _theRegistrar = new RegistrarWSImple();
         }

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -35,7 +35,7 @@
 import com.arjuna.mw.wsas.activity.ActivityHierarchy;
 import com.arjuna.mw.wsas.exceptions.SystemException;
 import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
 import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wst.ba.participants.BusinessAgreementWithCoordinatorCompletionWSImple;
@@ -64,7 +64,7 @@
 	public RegistrarWSImple() throws ProtocolNotRegisteredException,
 			SystemException
 	{
-		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+		_coordManager = CoordinatorManager11Factory.coordinatorManager();
 
 		// register with mapper using tx id as protocol identifier.
 		final RegistrarMapperWS mapper = RegistrarMapperWS.getFactory();

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -33,7 +33,7 @@
 
 import com.arjuna.mw.wsas.activity.ActivityHierarchy;
 import com.arjuna.mw.wsas.exceptions.InvalidActivityException;
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
 import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
 import com.arjuna.wst.SystemException;
 import com.arjuna.wst.UnknownTransactionException;
@@ -58,7 +58,7 @@
     {
 	try
 	{
-	    _coordManager = CoordinatorManagerFactory.coordinatorManager();
+	    _coordManager = CoordinatorManager11Factory.coordinatorManager();
 	    _hier = _coordManager.currentActivity();
 	    _participantId = participantId;
 	}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,213 @@
+/*
+ * 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 
+ * 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 
+ * 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, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManagerImple.java,v 1.7.4.1 2005/11/22 10:36:08 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba.remote;
+
+import com.arjuna.mw.wst.BusinessActivity11Manager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst.ba.context.TxContextWSImple;
+import com.arjuna.webservices.ServiceRegistryWS;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
+import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
+import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
+import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.RegistrationCoordinatorWS;
+import com.arjuna.wsc.messaging.MessageIdWS;
+import com.arjuna.wst.*;
+import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS;
+import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS;
+import com.arjuna.wst.stub.BACoordinatorCompletionParticipantManagerStubWS;
+import com.arjuna.wst.stub.BAParticipantCompletionParticipantManagerStubWS;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ */
+
+public class BusinessActivity11ManagerImple extends BusinessActivity11Manager
+{
+    public BusinessActivity11ManagerImple()
+    {
+    }
+
+    public BAParticipantManagerWS enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant bap, String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final QName service = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME;
+        final QName endpoint = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME);
+        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
+    	try
+    	{
+            W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
+            final ParticipantCompletionParticipantEngineWS engine = new ParticipantCompletionParticipantEngineWS(id, baPMEndpoint, bap) ;
+            ParticipantCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
+
+            return new BAParticipantCompletionParticipantManagerStubWS(engine);
+    	}
+    	catch (com.arjuna.wsc.InvalidProtocolException ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wsc.InvalidStateException ex)
+    	{
+    	    throw new WrongStateException();
+    	}
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    throw new UnknownTransactionException();
+    	}
+    	catch (Throwable ex)
+    	{
+    	    ex.printStackTrace();
+
+    	    throw new SystemException(ex.toString());
+    	}
+    }
+
+    public BAParticipantManagerWS enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final QName service = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME;
+        final QName endpoint = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME);
+        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
+    	try
+    	{
+    	    W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION);
+            final CoordinatorCompletionParticipantEngineWS engine = new CoordinatorCompletionParticipantEngineWS(id, baPMEndpoint, bawcp) ;
+            CoordinatorCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
+
+            return new BACoordinatorCompletionParticipantManagerStubWS(engine);
+    	}
+    	catch (com.arjuna.wsc.InvalidProtocolException ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wsc.InvalidStateException ex)
+    	{
+    	    throw new WrongStateException();
+    	}
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    ex.printStackTrace();
+
+    	    throw new UnknownTransactionException();
+    	}
+    	catch (Throwable ex)
+    	{
+    	    ex.printStackTrace();
+
+    	    throw new SystemException(ex.toString());
+    	}
+    }
+
+    public TxContext suspend () throws SystemException
+    {
+        return _ctxManager.suspend();
+    }
+
+    // resume overwrites. Should we check first a la JTA?
+
+    public void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+        _ctxManager.resume(tx);
+    }
+
+    public TxContext currentTransaction () throws SystemException
+    {
+        return _ctxManager.currentTransaction();
+    }
+
+    private final W3CEndpointReference registerParticipant(final W3CEndpointReference participant, final String protocol)
+        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.NoActivityException, SystemException
+    {
+    	TxContextWSImple currentTx = null;
+
+    	try
+    	{
+    	    currentTx = (TxContextWSImple) _ctxManager.currentTransaction();
+
+    	    if (currentTx == null)
+        		throw new com.arjuna.wsc.NoActivityException();
+
+            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
+            final String messageId = MessageIdWS.getMessageId() ;
+            return RegistrationCoordinatorWS.register(coordinationContext, messageId, participant, protocol) ;
+    	}
+        catch (final SoapFault sf)
+        {
+            throw new SystemException(sf.getMessage());
+        }
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+
+    	    throw new SystemException(ex.toString());
+    	}
+    	finally
+    	{
+    	    try
+    	    {
+        		if (currentTx != null)
+        		    _ctxManager.resume(currentTx);
+    	    }
+    	    catch (Exception ex)
+    	    {
+        		ex.printStackTrace();
+    	    }
+    	}
+    }
+
+    private W3CEndpointReference getParticipant(final QName service, final QName endpoint, final String address, final String id)
+    {
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(service);
+        builder.endpointName(endpoint);
+        builder.address(address);
+        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
+        return builder.build();
+    }
+
+    private ContextManager _ctxManager = new ContextManager();
+}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivityManagerWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivityManagerWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivityManagerWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -1,214 +0,0 @@
-/*
- * 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 
- * 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 
- * 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, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2003,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: BusinessActivityManagerImple.java,v 1.7.4.1 2005/11/22 10:36:08 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wst.ba.remote;
-
-import com.arjuna.mw.wst.BusinessActivityManagerWS;
-import com.arjuna.mw.wst.TxContext;
-import com.arjuna.mwlabs.wst.ba.context.TxContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
-import com.arjuna.wsc.AlreadyRegisteredException;
-import com.arjuna.wsc.RegistrationCoordinatorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.*;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS;
-import com.arjuna.wst.stub.BACoordinatorCompletionParticipantManagerStubWS;
-import com.arjuna.wst.stub.BAParticipantCompletionParticipantManagerStubWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-/**
- * This is the interface that the core exposes in order to allow different
- * types of participants to be enrolled. The messaging layer continues to
- * work in terms of the registrar, but internally we map to one of these
- * methods.
- */
-
-public class BusinessActivityManagerWSImple extends BusinessActivityManagerWS
-{
-    public BusinessActivityManagerWSImple()
-    {
-    }
-
-    public BAParticipantManagerWS enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant bap, String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
-    {
-        final QName service = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME;
-        final QName endpoint = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME);
-        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
-    	try
-    	{
-            W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
-            final ParticipantCompletionParticipantEngineWS engine = new ParticipantCompletionParticipantEngineWS(id, baPMEndpoint, bap) ;
-            ParticipantCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
-
-            return new BAParticipantCompletionParticipantManagerStubWS(engine);
-    	}
-    	catch (com.arjuna.wsc.InvalidProtocolException ex)
-    	{
-    	    throw new SystemException(ex.toString());
-    	}
-    	catch (com.arjuna.wsc.InvalidStateException ex)
-    	{
-    	    throw new WrongStateException();
-    	}
-    	catch (com.arjuna.wsc.NoActivityException ex)
-    	{
-    	    throw new UnknownTransactionException();
-    	}
-    	catch (Throwable ex)
-    	{
-    	    ex.printStackTrace();
-
-    	    throw new SystemException(ex.toString());
-    	}
-    }
-
-    public BAParticipantManagerWS enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
-    {
-        final QName service = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME;
-        final QName endpoint = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME);
-        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
-    	try
-    	{
-    	    W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION);
-            final CoordinatorCompletionParticipantEngineWS engine = new CoordinatorCompletionParticipantEngineWS(id, baPMEndpoint, bawcp) ;
-            CoordinatorCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
-
-            return new BACoordinatorCompletionParticipantManagerStubWS(engine);
-    	}
-    	catch (com.arjuna.wsc.InvalidProtocolException ex)
-    	{
-    	    throw new SystemException(ex.toString());
-    	}
-    	catch (com.arjuna.wsc.InvalidStateException ex)
-    	{
-    	    throw new WrongStateException();
-    	}
-    	catch (com.arjuna.wsc.NoActivityException ex)
-    	{
-    	    ex.printStackTrace();
-
-    	    throw new UnknownTransactionException();
-    	}
-    	catch (Throwable ex)
-    	{
-    	    ex.printStackTrace();
-
-    	    throw new SystemException(ex.toString());
-    	}
-    }
-
-    public TxContext suspend () throws SystemException
-    {
-        return _ctxManager.suspend();
-    }
-
-    // resume overwrites. Should we check first a la JTA?
-
-    public void resume (TxContext tx) throws UnknownTransactionException, SystemException
-    {
-        _ctxManager.resume(tx);
-    }
-
-    public TxContext currentTransaction () throws SystemException
-    {
-        return _ctxManager.currentTransaction();
-    }
-
-    private final W3CEndpointReference registerParticipant(final W3CEndpointReference participant, final String protocol)
-        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.NoActivityException, SystemException
-    {
-    	TxContextWSImple currentTx = null;
-
-    	try
-    	{
-    	    currentTx = (TxContextWSImple) _ctxManager.currentTransaction();
-
-    	    if (currentTx == null)
-        		throw new com.arjuna.wsc.NoActivityException();
-
-            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
-            final String messageId = MessageIdWS.getMessageId() ;
-            return RegistrationCoordinatorWS.register(coordinationContext, messageId, participant, protocol) ;
-    	}
-        catch (final SoapFault sf)
-        {
-            throw new SystemException(sf.getMessage());
-        }
-    	catch (com.arjuna.wsc.NoActivityException ex)
-    	{
-    	    throw ex;
-    	}
-    	catch (Exception ex)
-    	{
-    	    ex.printStackTrace();
-
-    	    throw new SystemException(ex.toString());
-    	}
-    	finally
-    	{
-    	    try
-    	    {
-        		if (currentTx != null)
-        		    _ctxManager.resume(currentTx);
-    	    }
-    	    catch (Exception ex)
-    	    {
-        		ex.printStackTrace();
-    	    }
-    	}
-    }
-
-    private W3CEndpointReference getParticipant(final QName service, final QName endpoint, final String address, final String id)
-    {
-        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(service);
-        builder.endpointName(endpoint);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
-        return builder.build();
-    }
-
-    private ContextManager _ctxManager = new ContextManager();
-}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -31,7 +31,7 @@
 
 package com.arjuna.mwlabs.wst.ba.remote;
 
-import com.arjuna.mw.wst.UserBusinessActivity;
+import com.arjuna.mw.wst.UserBusinessActivity11;
 import com.arjuna.mw.wst.common.Environment;
 import com.arjuna.mw.wstx.logging.wstxLogger;
 import com.arjuna.mwlabs.wst.ba.ContextWSImple;
@@ -68,7 +68,7 @@
  * @message com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_3 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_3] - No termination context!
  */
 
-public class UserBusinessActivityWSImple extends UserBusinessActivity
+public class UserBusinessActivityWSImple extends UserBusinessActivity11
 {
     public UserBusinessActivityWSImple()
     {

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -41,7 +41,7 @@
 	</service>
 	<service name="BusinessActivityManager">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.remote.BusinessActivityManagerImple"/>
+		value="com.arjuna.mwlabs.wst.ba.remote.BusinessActivity11ManagerImple"/>
 		<!-- parameter name="className"
 		value="com.arjuna.mwlabs.wst.ba.local.BusinessActivityManagerImple"/ -->
 	</service>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -40,13 +40,6 @@
         name="com.arjuna.mw.wscf.protocolImplementation4"
         value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
 
-        <property
-        name="com.arjuna.mw.wscfws.protocolImplementation1"
-        value="com.arjuna.mwlabs.wst.at.ContextFactoryWSImple"/>
-        <property
-        name="com.arjuna.mw.wscfws.protocolImplementation2"
-        value="com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple"/>
-
 	    <property
 	    name="com.arjuna.ats.arjuna.objectstore.objectStoreDir"
 	    value="XTSObjectStore"/>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -21,23 +21,21 @@
 
 <wstx-config>
 	<properties>
-	    <property name="com.arjuna.mw.wsas.deploymentContext"
-	    value="com.arjuna.mwlabs.wst.at.context.DeploymentContextImple"/>
-	    <property name="com.arjuna.mw.wscf.protocols.twophase.context"
+	    <property name="com.arjuna.mw.wscf11.protocols.twophase.context"
 	    value="com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple"/>
-	    <property name="com.arjuna.mw.wscf.protocols.sagas.context"
+	    <property name="com.arjuna.mw.wscf11.protocols.sagas.context"
 	    value="com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple"/>
 	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation1"
+	    name="com.arjuna.mw.wscf11.protocolImplementation1"
 	    value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple"/>
 	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation2"
+	    name="com.arjuna.mw.wscf11.protocolImplementation2"
 	    value="com.arjuna.mwlabs.wst.at.ContextFactoryImple"/>
 	    <property
-	    name="com.arjuna.mw.wscf.protocolImplementation3"
+	    name="com.arjuna.mw.wscf11.protocolImplementation3"
 	    value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.SagasHLSImple"/>
         <property
-        name="com.arjuna.mw.wscf.protocolImplementation4"
+        name="com.arjuna.mw.wscf11.protocolImplementation4"
         value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
 
         <property

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -0,0 +1,32 @@
+<!--
+  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 
+  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 
+  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, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <display-name>Arjuna WS-TX11</display-name>
+
+    <description>Arjuna WS-TX11</description>
+
+    <listener>
+        <listener-class>com.arjuna.mw.wst.deploy.WSTXWSInitialisation</listener-class>
+    </listener>
+</web-app>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -93,6 +93,13 @@
 
     <module>
         <web>
+            <web-uri>wstx11.war</web-uri>
+            <context-root>/wstx11</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
             <web-uri>xts-demo-webservices.war</web-uri>
             <context-root>/xtsdemowebservices</context-root>
         </web>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -21,7 +21,7 @@
 <deployment>
 	<service name="UserTransaction">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple"/>
+		value="com.arjuna.mwlabs.wst.at.remote.UserTransactionImple"/>
 
 		<!-- <parameter name="className"
 	value="com.arjuna.mwlabs.wst.at.local.UserTransactionImple"/ -->
@@ -29,13 +29,13 @@
 	</service>
 	<service name="TransactionManager">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.at.remote.TransactionManagerWSImple"/>
+		value="com.arjuna.mwlabs.wst.at.remote.TransactionManagerImple"/>
 		<!-- parameter name="className"
 		value="com.arjuna.mwlabs.wst.at.local.TransactionManagerImple"/ -->
 	</service>
 	<service name="UserBusinessActivity">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple"/>
+		value="com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityImple"/>
 		<!-- parameter name="className"
 		value="com.arjuna.mwlabs.wst.ba.local.UserBusinessActivityImple"/ -->
 	</service>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -29,10 +29,10 @@
 
 package com.jboss.jbosstm.xts.demo.client;
 
-import com.arjuna.mw.wst.UserBusinessActivity;
-import com.arjuna.mw.wst.UserBusinessActivityFactory;
-import com.arjuna.mw.wst.UserTransaction;
-import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.UserBusinessActivity11;
+import com.arjuna.mw.wst.UserBusinessActivity11Factory;
+import com.arjuna.mw.wst.UserTransaction11;
+import com.arjuna.mw.wst.UserTransaction11Factory;
 import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessorWS;
 import com.arjuna.wst.TransactionRolledBackException;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
@@ -481,7 +481,7 @@
     {
         System.out.println("CLIENT: obtaining userTransaction...");
 
-        UserTransaction ut = UserTransactionFactory.userTransaction();
+        UserTransaction11 ut = UserTransaction11Factory.userTransaction();
 
         System.out.println("CLIENT: starting the transaction...");
 
@@ -520,7 +520,7 @@
     {
         System.out.println("CLIENT: obtaining userBusinessActivity...");
 
-        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+        UserBusinessActivity11 uba = UserBusinessActivity11Factory.userBusinessActivity();
 
         System.out.println("CLIENT: starting the transaction...");
 
@@ -587,32 +587,4 @@
         Service service = Service.create(addressURL, serviceName);
         return service.getPort(endpointName, clazz);
     }
-/*
- * n.b. we cannot do this because the service is not in the same webapp as this client.
- * it would be ok to do this from the same war file.
-    private W3CEndpointReference getService(final QName serviceName, final QName endpointName,
-                                            final String address, final String wsdlURL)
-            throws IllegalStateException
-    {
-        try {
-            W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-            builder.serviceName(serviceName);
-            builder.endpointName(endpointName);
-            builder.wsdlDocumentLocation(wsdlURL);
-            // don't use address -- only getting local service from same app
-            return builder.build();
-        } catch (IllegalStateException e) {
-            // must have been given a bad address
-            StringBuffer buffer = new StringBuffer();
-            buffer.append("CLIENT: failed to locate endpoint: \n\tendpoint name: ");
-            buffer.append(serviceName);
-            buffer.append("\n\tservice name: ");
-            buffer.append(endpointName);
-            buffer.append("\n\taddress: ");
-            buffer.append(address);
-            System.out.println(buffer.toString());
-            throw e;
-        }
-    }
-    */
 }

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.restaurant;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManagerFactory;
-import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManager11Factory;
+import com.arjuna.mw.wst.UserTransaction11Factory;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
 
 import javax.jws.HandlerChain;
@@ -73,7 +73,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
+            transactionId = UserTransaction11Factory.userTransaction().toString();
             System.out.println("RestaurantServiceAT transaction id =" + transactionId);
 
             if (!restaurantManager.knowsAbout(transactionId))
@@ -81,7 +81,7 @@
                 System.out.println("RestaurantServiceAT - enrolling...");
                 // enlist the Participant for this service:
                 RestaurantParticipantAT restaurantParticipant = new RestaurantParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
+                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.restaurant;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManagerFactoryWS;
-import com.arjuna.mw.wst.BusinessActivityManagerWS;
+import com.arjuna.mw.wst.BusinessActivityManager11Factory;
+import com.arjuna.mw.wst.BusinessActivity11Manager;
 import com.arjuna.wst.BAParticipantManagerWS;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
@@ -70,7 +70,7 @@
         RestaurantView restaurantView = RestaurantView.getSingletonInstance();
         RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
 
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
+        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.taxi;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManagerFactory;
-import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManager11Factory;
+import com.arjuna.mw.wst.UserTransaction11Factory;
 import com.jboss.jbosstm.xts.demo.taxi.ITaxiService;
 
 import javax.jws.WebService;
@@ -68,7 +68,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
+            transactionId = UserTransaction11Factory.userTransaction().toString();
             System.out.println("TaxiServiceAT transaction id =" + transactionId);
 
             if (!taxiManager.knowsAbout(transactionId))
@@ -76,7 +76,7 @@
                 System.out.println("TaxiServiceAT - enrolling...");
                 // enlist the Participant for this service:
                 TaxiParticipantAT taxiParticipant = new TaxiParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
+                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.taxi;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManagerFactoryWS;
-import com.arjuna.mw.wst.BusinessActivityManagerWS;
+import com.arjuna.mw.wst.BusinessActivityManager11Factory;
+import com.arjuna.mw.wst.BusinessActivity11Manager;
 import com.arjuna.wst.BAParticipantManagerWS;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
@@ -70,7 +70,7 @@
         TaxiView taxiView = TaxiView.getSingletonInstance();
         TaxiManager taxiManager = TaxiManager.getSingletonInstance();
 
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
+        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.theatre;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManagerFactory;
-import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManager11Factory;
+import com.arjuna.mw.wst.UserTransaction11Factory;
 import com.jboss.jbosstm.xts.demo.theatre.ITheatreService;
 
 import javax.jws.WebService;
@@ -76,7 +76,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
+            transactionId = UserTransaction11Factory.userTransaction().toString();
             System.out.println("TheatreServiceAT transaction id =" + transactionId);
 
             if (!theatreManager.knowsAbout(transactionId))
@@ -84,7 +84,7 @@
                 System.out.println("theatreService - enrolling...");
                 // enlist the Participant for this service:
                 TheatreParticipantAT theatreParticipant = new TheatreParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
+                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.theatre;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManagerFactoryWS;
-import com.arjuna.mw.wst.BusinessActivityManagerWS;
+import com.arjuna.mw.wst.BusinessActivityManager11Factory;
+import com.arjuna.mw.wst.BusinessActivity11Manager;
 import com.arjuna.wst.BAParticipantManagerWS;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
@@ -74,7 +74,7 @@
         TheatreView theatreView = TheatreView.getSingletonInstance();
         TheatreManager theatreManager = TheatreManager.getSingletonInstance();
 
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
+        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml	2008-01-25 09:44:36 UTC (rev 18100)
@@ -159,10 +159,6 @@
         <copy todir="${build.config}" filtering="true">
             <fileset dir="${conf.dir}" includes="wscf.xml wscf11.xml wstx.xml wstx11.xml wst.xml wst11.xml"/>
 	</copy>
-	<!-- these lines switch in wscoor1.1 support -->
-	<move file="${build.config}/wst11.xml" tofile="${build.config}/wst.xml"/>
-	<move file="${build.config}/wstx11.xml" tofile="${build.config}/wstx.xml"/>
-	<move file="${build.config}/wscf11.xml" tofile="${build.config}/wscf.xml"/>
         <jar destfile="${build.dir}/config.jar" basedir="${build.config}"/>
     </target>
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/sar/src/org/jboss/transactions/XTSService.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/sar/src/org/jboss/transactions/XTSService.java	2008-01-25 09:05:42 UTC (rev 18099)
+++ labs/jbosstm/workspace/adinn/XTSGF/sar/src/org/jboss/transactions/XTSService.java	2008-01-25 09:44:36 UTC (rev 18100)
@@ -24,7 +24,6 @@
 import org.jboss.logging.Logger;
 
 import com.arjuna.mw.wsas.utils.Configuration;
-import com.arjuna.mw.wst.deploy.WSTXInitialisation;
 import com.arjuna.mw.wst.UserTransaction;
 import com.arjuna.mw.wst.TransactionManager;
 import com.arjuna.mw.wst.UserBusinessActivity;
@@ -38,7 +37,6 @@
 import com.arjuna.webservices.SoapRegistry;
 import com.arjuna.webservices.SoapService;
 import com.arjuna.webservices.SoapClient;
-import com.arjuna.webservices.util.ClassLoaderHelper;
 import com.arjuna.webservices.wsba.policy.CoordinatorCompletionCoordinatorPolicy;
 import com.arjuna.webservices.wsba.policy.CoordinatorCompletionParticipantPolicy;
 import com.arjuna.webservices.wsba.policy.ParticipantCompletionCoordinatorPolicy;
@@ -71,10 +69,7 @@
 import com.arjuna.webservices.wscoor.processors.RegistrationCoordinatorProcessor;
 import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
 import com.arjuna.wst.messaging.*;
-import com.arjuna.ats.arjuna.recovery.RecoveryManager;
 
-import java.io.InputStream;
-
 /**
  * $Id$
  */




More information about the jboss-svn-commits mailing list