[jboss-svn-commits] JBL Code SVN: r18206 - in labs/jbosstm/workspace/adinn/XTSGF: demo and 24 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jan 30 10:35:09 EST 2008


Author: adinn
Date: 2008-01-30 10:35:08 -0500 (Wed, 30 Jan 2008)
New Revision: 18206

Added:
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-jaxrpc-mapping.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/jaxrpc-mapping.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/service-web-app.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/webservices.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/build.sh
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort_Stub.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA_Impl.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/webmethods/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/webmethods/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/web/index11.jsp
Removed:
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
Modified:
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/jboss.properties
   labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml
Log:
restored old jaxrpc based demo which uses 1.0 wscoor protocols while retaining new jaxws based demo which uses 1.1 wscoor protocols in src11 tree

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-30 11:45:09 UTC (rev 18205)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -159,7 +159,7 @@
 		<jar jarfile="${com.arjuna.mwlabs.wscf.jar.dest}/${com.arjuna.mwlabs.ts.modulename}.jar"
             basedir="${com.arjuna.mwlabs.wscf.dest}">
             <manifest>
-                <attribute name="Class-Path" value="${wsas.libs} ${wsc.libs} ${jta.lib.jars} ${jta.ext.jars} config.jar"/>
+                <attribute name="Class-Path" value="${wsas.libs} ${wsc.libs} ${jta.lib.jars} ${jta.ext.jars} config.jar config11.jar"/>
             </manifest>
         </jar>
 	</target>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/build.xml	2008-01-30 11:45:09 UTC (rev 18205)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/build.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -225,8 +225,10 @@
         <copy todir="${selected-distrib-dir}">
             <fileset dir=".">
                 <include name="src/**"/>
+                <include name="src11/**"/>
                 <include name="html/**"/>
                 <include name="dd/**"/>
+                <include name="dd11/**"/>
                 <include name="web/**"/>
                 <include name="*.properties"/>
                 <include name="build.sh"/>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/application.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,129 @@
+<!--
+  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.
+-->
+
+<!-- $Id: axis-application.xml,v 1.8.4.1 2005/11/22 10:42:05 kconner Exp $ -->
+
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+
+<application>
+    <display-name>XML Transaction Service Demo</display-name>
+
+    <description>XML Transaction Service Demo</description>
+
+    <module>
+        <web>
+            <web-uri>ws-c.war</web-uri>
+            <context-root>/xts</context-root>
+        </web>
+    </module>
+    
+    <module>
+        <web>
+            <web-uri>ws-c11.war</web-uri>
+            <context-root>/ws-c11</context-root>
+        </web>
+    </module>
+    
+    <module>
+        <web>
+            <web-uri>ws-c11init.war</web-uri>
+            <context-root>/ws-c11init</context-root>
+        </web>
+    </module>
+    
+    <module>
+        <web>
+            <web-uri>ws-t.war</web-uri>
+            <context-root>/ws-t</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>ws-t11.war</web-uri>
+            <context-root>/ws-t11</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>ws-t11init.war</web-uri>
+            <context-root>/ws-t11init</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>wscf.war</web-uri>
+            <context-root>/wscf</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>wscf11.war</web-uri>
+            <context-root>/wscf11</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>wstx.war</web-uri>
+            <context-root>/wstx</context-root>
+        </web>
+    </module>
+
+    <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>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>xts-demo.war</web-uri>
+            <context-root>/xts-demo</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>xts-demo-webservices11.war</web-uri>
+            <context-root>/xtsdemowebservices11</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>xts-demo11.war</web-uri>
+            <context-root>/xts-demo11</context-root>
+        </web>
+    </module>
+
+</application>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-jaxrpc-mapping.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-jaxrpc-mapping.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-jaxrpc-mapping.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,38 @@
+<!--
+  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.
+-->
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+	version="1.1">
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.clients.jboss.restaurant</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Restaurant</namespaceURI>
+	</package-mapping>
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.clients.jboss.theatre</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Theatre</namespaceURI>
+	</package-mapping>
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.clients.jboss.taxi</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Taxi</namespaceURI>
+	</package-mapping>
+</java-wsdl-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,63 @@
+<!--
+  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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	version="2.4">
+    <display-name>XML Transaction Service Demo Client</display-name>
+
+    <description>XML Transaction Service Demo Client</description>
+
+    <servlet>
+        <servlet-name>Basic Client Servlet</servlet-name>
+        <servlet-class>com.arjuna.xts.nightout.clients.jboss.BasicClient</servlet-class>
+        <init-param>
+            <param-name>restaurantATURL</param-name>
+            <param-value>@restaurantATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>restaurantBAURL</param-name>
+            <param-value>@restaurantBAURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>taxiATURL</param-name>
+            <param-value>@taxiATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>taxiBAURL</param-name>
+            <param-value>@taxiBAURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>theatreATURL</param-name>
+            <param-value>@theatreATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>theatreBAURL</param-name>
+            <param-value>@theatreBAURL@</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Basic Client Servlet</servlet-name>
+        <url-pattern>/basicclient</url-pattern>
+    </servlet-mapping>
+</web-app>

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app11.xml (from rev 18035, labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app.xml)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/client-web-app11.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,63 @@
+<!--
+  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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	version="2.4">
+    <display-name>XML Transaction Service 1.1 Demo Client</display-name>
+
+    <description>XML Transaction Service 1.1 Demo Client</description>
+
+    <servlet>
+        <servlet-name>Basic Client Servlet</servlet-name>
+        <servlet-class>com.jboss.jbosstm.xts.demo.client.BasicClient</servlet-class>
+        <init-param>
+            <param-name>restaurantATURL</param-name>
+            <param-value>@restaurantATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>restaurantBAURL</param-name>
+            <param-value>@restaurantBAURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>taxiATURL</param-name>
+            <param-value>@taxiATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>taxiBAURL</param-name>
+            <param-value>@taxiBAURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>theatreATURL</param-name>
+            <param-value>@theatreATURL@</param-value>
+        </init-param>
+        <init-param>
+            <param-name>theatreBAURL</param-name>
+            <param-value>@theatreBAURL@</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Basic Client Servlet</servlet-name>
+        <url-pattern>/basicclient11</url-pattern>
+    </servlet-mapping>
+</web-app>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+	<handler>
+		<handler-name>ContextHandler</handler-name>
+		<handler-class>com.arjuna.mw.wst.service.JaxWSHeaderContextProcessor</handler-class>
+	</handler>
+    </handler-chain>
+</handler-chains>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+	<handler>
+		<handler-name>ContextHandler</handler-name>
+		<handler-class>com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor</handler-class>
+	</handler>
+    </handler-chain>
+</handler-chains>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/jaxrpc-mapping.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/jaxrpc-mapping.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/jaxrpc-mapping.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,38 @@
+<!--
+  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.
+-->
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+	version="1.1">
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.services.Restaurant</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Restaurant</namespaceURI>
+	</package-mapping>
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.services.Theatre</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Theatre</namespaceURI>
+	</package-mapping>
+	<package-mapping>
+		<package-type>com.arjuna.xts.nightout.services.Taxi</package-type>
+		<namespaceURI>http://www.jboss.com/jbosstm/xts/demo/Taxi</namespaceURI>
+	</package-mapping>
+</java-wsdl-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/service-web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/service-web-app.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/service-web-app.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,75 @@
+<!--
+  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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	version="2.4">
+
+	<servlet>
+		<servlet-name>RestaurantServiceAT</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Restaurant.RestaurantServiceAT</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>RestaurantServiceBA</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Restaurant.RestaurantServiceBA</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>TheatreServiceAT</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Theatre.TheatreServiceAT</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>TheatreServiceBA</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Theatre.TheatreServiceBA</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>TaxiServiceAT</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Taxi.TaxiServiceAT</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>TaxiServiceBA</servlet-name>
+		<servlet-class>com.arjuna.xts.nightout.services.Taxi.TaxiServiceBA</servlet-class>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>RestaurantServiceAT</servlet-name>
+		<url-pattern>/RestaurantServiceAT</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>RestaurantServiceBA</servlet-name>
+		<url-pattern>/RestaurantServiceBA</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>TheatreServiceAT</servlet-name>
+		<url-pattern>/TheatreServiceAT</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>TheatreServiceBA</servlet-name>
+		<url-pattern>/TheatreServiceBA</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>TaxiServiceAT</servlet-name>
+		<url-pattern>/TaxiServiceAT</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>TaxiServiceBA</servlet-name>
+		<url-pattern>/TaxiServiceBA</url-pattern>
+	</servlet-mapping>
+</web-app>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/webservices.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/webservices.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/webservices.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,139 @@
+<!--
+  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.
+-->
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:impl="http://www.jboss.com/jbosstm/xts/demo"
+	version="1.1">
+
+	<webservice-description>
+		<webservice-description-name>RestaurantServiceAT</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/RestaurantServiceAT.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>RestaurantServiceAT</port-component-name>
+			<wsdl-port xmlns:rest="http://www.jboss.com/jbosstm/xts/demo/Restaurant">rest:RestaurantServiceAT</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Restaurant.IRestaurantService</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>RestaurantServiceAT</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+	<webservice-description>
+		<webservice-description-name>RestaurantServiceBA</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/RestaurantServiceBA.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>RestaurantServiceBA</port-component-name>
+			<wsdl-port xmlns:rest="http://www.jboss.com/jbosstm/xts/demo/Restaurant">rest:RestaurantServiceBA</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Restaurant.IRestaurantServiceBA</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>RestaurantServiceBA</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+	<webservice-description>
+		<webservice-description-name>TheatreServiceAT</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/TheatreServiceAT.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>TheatreServiceAT</port-component-name>
+			<wsdl-port xmlns:theatre="http://www.jboss.com/jbosstm/xts/demo/Theatre">theatre:TheatreServiceAT</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Theatre.ITheatreService</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>TheatreServiceAT</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+	<webservice-description>
+		<webservice-description-name>TheatreServiceBA</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/TheatreServiceBA.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>TheatreServiceBA</port-component-name>
+			<wsdl-port xmlns:theatre="http://www.jboss.com/jbosstm/xts/demo/Theatre">theatre:TheatreServiceBA</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Theatre.ITheatreServiceBA</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>TheatreServiceBA</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+	<webservice-description>
+		<webservice-description-name>TaxiServiceAT</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/TaxiServiceAT.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>TaxiServiceAT</port-component-name>
+			<wsdl-port xmlns:taxi="http://www.jboss.com/jbosstm/xts/demo/Taxi">taxi:TaxiServiceAT</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Taxi.ITaxiService</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>TaxiServiceAT</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+	<webservice-description>
+		<webservice-description-name>TaxiServiceBA</webservice-description-name>
+
+		<wsdl-file>WEB-INF/wsdl/TaxiServiceBA.wsdl</wsdl-file>
+
+		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+		<port-component>
+			<port-component-name>TaxiServiceBA</port-component-name>
+			<wsdl-port xmlns:taxi="http://www.jboss.com/jbosstm/xts/demo/Taxi">taxi:TaxiServiceBA</wsdl-port>
+			<service-endpoint-interface>com.arjuna.xts.nightout.services.Taxi.ITaxiServiceBA</service-endpoint-interface>
+			<service-impl-bean>
+				<servlet-link>TaxiServiceBA</servlet-link>
+			</service-impl-bean>
+			<handler>
+				<handler-name>serverHandler</handler-name>
+				<handler-class>com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor</handler-class>
+			</handler>
+		</port-component>
+	</webservice-description>
+</webservices>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,79 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Restaurant" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Restaurant" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant">
+
+   <wsdl:message name="bookSeatsRequest">
+
+      <wsdl:part name="how_many" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="bookSeatsResponse">
+
+   </wsdl:message>
+
+   <wsdl:portType name="IRestaurantService">
+
+      <wsdl:operation name="bookSeats" parameterOrder="how_many">
+
+         <wsdl:input name="bookSeatsRequest" message="intf:bookSeatsRequest"/>
+
+         <wsdl:output name="bookSeatsResponse" message="intf:bookSeatsResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="RestaurantServiceATSoapBinding" type="intf:IRestaurantService">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookSeats">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookSeatsRequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookSeatsResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="RestaurantServiceATService">
+
+      <wsdl:port name="RestaurantServiceAT" binding="intf:RestaurantServiceATSoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/RestaurantServiceAT"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,81 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Restaurant" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Restaurant" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant">
+
+   <wsdl:message name="bookSeatsBARequest">
+
+      <wsdl:part name="how_many" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="bookSeatsBAResponse">
+
+      <wsdl:part name="bookSeatsBAResponse" type="xsd:boolean"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="IRestaurantServiceBA">
+
+      <wsdl:operation name="bookSeats" parameterOrder="how_many">
+
+         <wsdl:input name="bookSeatsBARequest" message="intf:bookSeatsBARequest"/>
+
+         <wsdl:output name="bookSeatsBAResponse" message="intf:bookSeatsBAResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="RestaurantServiceBASoapBinding" type="intf:IRestaurantServiceBA">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookSeats">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookSeatsBARequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookSeatsBAResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Restaurant"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="RestaurantServiceBAService">
+
+      <wsdl:port name="RestaurantServiceBA" binding="intf:RestaurantServiceBASoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/RestaurantServiceBA"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,77 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Taxi" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Taxi" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Taxi">
+
+   <wsdl:message name="bookTaxiRequest">
+
+   </wsdl:message>
+
+   <wsdl:message name="bookTaxiResponse">
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITaxiService">
+
+      <wsdl:operation name="bookTaxi">
+
+         <wsdl:input name="bookTaxiRequest" message="intf:bookTaxiRequest"/>
+
+         <wsdl:output name="bookTaxiResponse" message="intf:bookTaxiResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="TaxiServiceATSoapBinding" type="intf:ITaxiService">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookTaxi">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookTaxiRequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Taxi"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookTaxiResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Taxi"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="TaxiServiceATService">
+
+      <wsdl:port name="TaxiServiceAT" binding="intf:TaxiServiceATSoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/TaxiServiceAT"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,79 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Taxi" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Taxi" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Taxi">
+
+   <wsdl:message name="bookTaxiBARequest">
+
+   </wsdl:message>
+
+   <wsdl:message name="bookTaxiBAResponse">
+
+      <wsdl:part name="bookTaxiBAResponse" type="xsd:boolean"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITaxiServiceBA">
+
+      <wsdl:operation name="bookTaxi">
+
+         <wsdl:input name="intf:bookTaxiBARequest" message="intf:bookTaxiBARequest"/>
+
+         <wsdl:output name="intf:bookTaxiBAResponse" message="intf:bookTaxiBAResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="TaxiServiceBASoapBinding" type="intf:ITaxiServiceBA">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookTaxi">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookTaxiBARequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Taxi"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookTaxiBAResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Taxi"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="TaxiServiceBAService">
+
+      <wsdl:port name="TaxiServiceBA" binding="intf:TaxiServiceBASoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/TaxiServiceBA"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,81 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Theatre" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Theatre" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Theatre">
+
+   <wsdl:message name="bookSeatsResponse">
+
+   </wsdl:message>
+
+   <wsdl:message name="bookSeatsRequest">
+
+      <wsdl:part name="how_many" type="xsd:int"/>
+
+      <wsdl:part name="which_area" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITheatreService">
+
+      <wsdl:operation name="bookSeats" parameterOrder="how_many which_area">
+
+         <wsdl:input name="intf:bookSeatsRequest" message="intf:bookSeatsRequest"/>
+
+         <wsdl:output name="intf:bookSeatsResponse" message="intf:bookSeatsResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="TheatreServiceATSoapBinding" type="intf:ITheatreService">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookSeats">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookSeatsRequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Theatre"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookSeatsResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Theatre"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="TheatreServiceATService">
+
+      <wsdl:port name="TheatreServiceAT" binding="intf:TheatreServiceATSoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/TheatreServiceAT"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,83 @@
+<!--
+  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.
+-->
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:intf="http://www.jboss.com/jbosstm/xts/demo/Theatre" xmlns:impl="http://www.jboss.com/jbosstm/xts/demo/Theatre" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.jboss.com/jbosstm/xts/demo/Theatre">
+
+   <wsdl:message name="bookSeatsBAResponse">
+
+      <wsdl:part name="bookSeatsBAResponse" type="xsd:boolean"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="bookSeatsBARequest">
+
+      <wsdl:part name="how_many" type="xsd:int"/>
+
+      <wsdl:part name="which_area" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITheatreServiceBA">
+
+      <wsdl:operation name="bookSeats" parameterOrder="how_many which_area">
+
+         <wsdl:input name="bookSeatsBARequest" message="intf:bookSeatsBARequest"/>
+
+         <wsdl:output name="bookSeatsBAResponse" message="intf:bookSeatsBAResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="TheatreServiceBASoapBinding" type="intf:ITheatreServiceBA">
+
+      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="bookSeats">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="bookSeatsBARequest">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Theatre"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="bookSeatsBAResponse">
+
+            <wsdlsoap:body use="literal" namespace="http://www.jboss.com/jbosstm/xts/demo/Theatre"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="TheatreServiceBAService">
+
+      <wsdl:port name="TheatreServiceBA" binding="intf:TheatreServiceBASoapBinding">
+
+         <wsdlsoap:address location="http://localhost:8080/xtsdemowebservices/TheatreServiceBA"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/build.sh
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/build.sh	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wsdl/build.sh	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,31 @@
+#!/bin/bash
+# generate jaxws code from wsdl
+
+GLASSFISHDIR=/home/adinn/glassfish/v2-b58g/glassfish/
+WSIMPORT=$GLASSFISHDIR/bin/wsimport
+
+if [ -d tmp/src ] ; then
+  rm -rf tmp/src/*
+fi
+if [ -d tmp/classes ] ; then
+  rm -rf tmp/classes/*
+fi
+if [ ! -d tmp/src ]; then
+  mkdir -p tmp/src
+fi
+if [ ! -d tmp/classes ] ; then
+  mkdir -p tmp/classes
+fi
+
+if [ $# -eq 0 ]; then
+    files=`ls ./*.wsdl` 
+else
+    files="$*"
+fi
+#for wsdlfile in RestaurantServiceAT.wsdl TaxiServiceAT.wsdl \
+#    TheatreServiceAT.wsdl RestaurantServiceBA.wsdl \
+#    TaxiServiceBA.wsdl TheatreServiceBA.wsdl
+for wsdlfile in $files
+do
+  $WSIMPORT -s tmp/src -d tmp/classes -keep -wsdllocation file:/WEB-INF/wsdl/$wsdlfile $wsdlfile
+done

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,48 @@
+<!--
+  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.
+-->
+<deployment>
+	<service name="UserTransaction">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst.at.remote.UserTransactionImple"/>
+
+		<!-- <parameter name="className"
+	value="com.arjuna.mwlabs.wst.at.local.UserTransactionImple"/ -->
+
+	</service>
+	<service name="TransactionManager">
+		<parameter name="className"
+		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.UserBusinessActivityImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.UserBusinessActivityImple"/ -->
+	</service>
+	<service name="BusinessActivityManager">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.remote.BusinessActivityManagerImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.BusinessActivityManagerImple"/ -->
+	</service>
+</deployment>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,48 @@
+<!--
+  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.
+-->
+<deployment>
+	<service name="UserTransaction">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple"/>
+
+		<!-- <parameter name="className"
+	value="com.arjuna.mwlabs.wst.at.local.UserTransactionImple"/ -->
+
+	</service>
+	<service name="TransactionManager">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.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.wst11.ba.remote.UserBusinessActivityImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.UserBusinessActivityImple"/ -->
+	</service>
+	<service name="BusinessActivityManager">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.BusinessActivityManagerImple"/ -->
+	</service>
+</deployment>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/jboss.properties
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/jboss.properties	2008-01-30 11:45:09 UTC (rev 18205)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/jboss.properties	2008-01-30 15:35:08 UTC (rev 18206)
@@ -30,18 +30,25 @@
   The default services are the ones running within JBoss.
 -->
 <arjuna>
-  <hostname>JBOSS_HOSTNAME</hostname>
-  <port>JBOSS_PORT</port>
-  <urlstub>JBOSS_URLSTUB</urlstub>
+  <hostname>localhost</hostname>
+  <port>8080</port>
+  <urlstub>xtsdemowebservices</urlstub>
   <deploy>
     <dir>JBOSS_DEPLOY_DIR</dir>
   </deploy>
 
   <!-- JBoss services -->
-  <restaurantATURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/RestaurantServiceATService</restaurantATURL>
-  <restaurantBAURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/RestaurantServiceBAService</restaurantBAURL>
-  <taxiATURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/TaxiServiceATService</taxiATURL>
-  <taxiBAURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/TaxiServiceBAService</taxiBAURL>
-  <theatreATURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/TheatreServiceATService</theatreATURL>
-  <theatreBAURL>http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/TheatreServiceBAService</theatreBAURL>
+  <restaurantATURL>http://localhost:8080/xtsdemowebservices/RestaurantServiceATService</restaurantATURL>
+  <restaurantBAURL>http://localhost:8080/xtsdemowebservices/RestaurantServiceBAService</restaurantBAURL>
+  <taxiATURL>http://localhost:8080/xtsdemowebservices/TaxiServiceATService</taxiATURL>
+  <taxiBAURL>http://localhost:8080/xtsdemowebservices/TaxiServiceBAService</taxiBAURL>
+  <theatreATURL>http://localhost:8080/xtsdemowebservices/TheatreServiceATService</theatreATURL>
+  <theatreBAURL>http://localhost:8080/xtsdemowebservices/TheatreServiceBAService</theatreBAURL>
+
+  <restaurantAT11URL>http://localhost:8080/xtsdemowebservices11/RestaurantServiceATService</restaurantAT11URL>
+  <restaurantBA11URL>http://localhost:8080/xtsdemowebservices11/RestaurantServiceBAService</restaurantBA11URL>
+  <taxiAT11URL>http://localhost:8080/xtsdemowebservices11/TaxiServiceATService</taxiAT11URL>
+  <taxiBA11URL>http://localhost:8080/xtsdemowebservices11/TaxiServiceBAService</taxiBA11URL>
+  <theatreAT11URL>http://localhost:8080/xtsdemowebservices11/TheatreServiceATService</theatreAT11URL>
+  <theatreBA11URL>http://localhost:8080/xtsdemowebservices11/TheatreServiceBAService</theatreBA11URL>
 </arjuna>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,379 @@
+/*
+ * 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.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.clients.jboss;
+
+import java.io.IOException;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
+
+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.wst.TransactionRolledBackException;
+import com.arjuna.xts.nightout.clients.jboss.restaurant.IRestaurantServiceAT;
+import com.arjuna.xts.nightout.clients.jboss.restaurant.IRestaurantServiceBA;
+import com.arjuna.xts.nightout.clients.jboss.taxi.ITaxiServiceAT;
+import com.arjuna.xts.nightout.clients.jboss.taxi.ITaxiServiceBA;
+import com.arjuna.xts.nightout.clients.jboss.theatre.ITheatreServiceAT;
+import com.arjuna.xts.nightout.clients.jboss.theatre.ITheatreServiceBA;
+
+/**
+ * A very basic client application that drives the
+ * (transactional) Web Services to arrange a night out.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ */
+public class BasicClient extends HttpServlet
+{
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = 7728495576623420083L ;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext context ;
+
+    /**
+     * The local context name for the AT Restaurant webservice.
+     */
+    private static final String RESTAURANT_SERVICE_AT = "java:comp/env/service/RestaurantServiceAT" ;
+    /**
+     * The local context name for the BA Restaurant webservice.
+     */
+    private static final String RESTAURANT_SERVICE_BA = "java:comp/env/service/RestaurantServiceBA" ;
+    /**
+     * The local context name for the AT Theatre webservice.
+     */
+    private static final String THEATRE_SERVICE_AT = "java:comp/env/service/TheatreServiceAT" ;
+    /**
+     * The local context name for the BA Theatre webservice.
+     */
+    private static final String THEATRE_SERVICE_BA = "java:comp/env/service/TheatreServiceBA" ;
+    /**
+     * The local context name for the AT Taxi webservice.
+     */
+    private static final String TAXI_SERVICE_AT = "java:comp/env/service/TaxiServiceAT" ;
+    /**
+     * The local context name for the BA Taxi webservice.
+     */
+    private static final String TAXI_SERVICE_BA = "java:comp/env/service/TaxiServiceBA" ;
+    
+    /**
+     * The atomic transaction restaurant stub.
+     */
+    private IRestaurantServiceAT restaurantAT;
+    /**
+     * The atomic transaction theatre stub.
+     */
+    private ITheatreServiceAT theatreAT;
+    /**
+     * The atomic transaction taxi stub.
+     */
+    private ITaxiServiceAT taxiAT;
+    /**
+     * The business activity restaurant stub.
+     */
+    private IRestaurantServiceBA restaurantBA;
+    /**
+     * The business activity theatre stub.
+     */
+    private ITheatreServiceBA theatreBA;
+    /**
+     * The business activity taxi stub.
+     */
+    private ITaxiServiceBA taxiBA;
+
+    /**
+     * URL of restaurant AT
+     */
+    private String restaurantATURL ;
+    /**
+     * URL of restaurant BA
+     */
+    private String restaurantBAURL ;
+    /**
+     * URL of taxi AT
+     */
+    private String taxiATURL ;
+    /**
+     * URL of taxi BA
+     */
+    private String taxiBAURL ;
+    /**
+     * URL of theatre AT
+     */
+    private String theatreATURL ;
+    /**
+     * URL of theatre BA
+     */
+    private String theatreBAURL ;
+
+    /**
+     * The initialised flag.
+     */
+    private boolean initialised ;
+    
+    /**
+     * Initialise the servlet.
+     * @param servletConfig The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        final String baseURL = "http://localhost:8080/xtsdemowebservices/" ;
+
+        restaurantATURL = getURL(config, "restaurantATURL", baseURL + "RestaurantServiceAT") ;
+        restaurantBAURL = getURL(config, "restaurantBAURL", baseURL + "RestaurantServiceBA") ;
+        taxiATURL = getURL(config, "taxiATURL", baseURL + "TaxiServiceAT") ;
+        taxiBAURL = getURL(config, "taxiBAURL", baseURL + "TaxiServiceBA") ;
+        theatreATURL = getURL(config, "theatreATURL", baseURL + "TheatreServiceAT") ;
+        theatreBAURL = getURL(config, "theatreBAURL", baseURL + "TheatreServiceBA") ;
+
+        context = config.getServletContext();
+    }
+
+    /**
+     * Initialise if necessary
+     */
+    private synchronized void initialise()
+    throws ServletException
+    {
+        if (!initialised)
+        {
+            try
+            {
+                restaurantAT = (IRestaurantServiceAT)getService(RESTAURANT_SERVICE_AT, restaurantATURL, IRestaurantServiceAT.class) ;
+                restaurantBA = (IRestaurantServiceBA)getService(RESTAURANT_SERVICE_BA, restaurantBAURL, IRestaurantServiceBA.class) ;
+                taxiAT = (ITaxiServiceAT)getService(TAXI_SERVICE_AT, taxiATURL, ITaxiServiceAT.class) ;
+                taxiBA = (ITaxiServiceBA)getService(TAXI_SERVICE_BA, taxiBAURL, ITaxiServiceBA.class) ;
+                theatreAT = (ITheatreServiceAT)getService(THEATRE_SERVICE_AT, theatreATURL, ITheatreServiceAT.class) ;
+                theatreBA = (ITheatreServiceBA)getService(THEATRE_SERVICE_BA, theatreBAURL, ITheatreServiceBA.class) ;
+            }
+            catch (final Exception ex)
+            {
+                ex.printStackTrace();
+                throw new ServletException(ex);
+            }
+            initialised = true ;
+        }
+    }
+
+    /**
+     * Simple wrapper to allow our test method to be invoked when
+     * running in a servlet container, taking parameters from the
+     * request URL and displaying the outcome on the resulting html page.
+     *
+     * @param request
+     * @param response
+     * @throws ServletException
+     * @throws IOException
+     */
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+    {
+        initialise() ;
+
+        // get business logic params from the form submission.
+        int restaurantSeats = Integer.parseInt(request.getParameter("restaurant"));
+        int theatreSeats = Integer.parseInt(request.getParameter("theatrecount"));
+        int theatreArea = Integer.parseInt(request.getParameter("theatrearea"));
+        int taxiCount = Integer.parseInt(request.getParameter("taxi"));
+        boolean bookTaxi = (taxiCount >= 1 ? true : false);
+
+        String result = "Transaction finished OK.";
+        String txType = request.getParameter("txType");
+
+        try
+        {
+            if ("AtomicTransaction".equals(txType))
+            {
+                testAtomicTransaction(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else if ("BusinessActivity".equals(txType))
+            {
+                testBusinessActivity(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else
+            {
+                result = "Unknown transaction type " + txType;
+            }
+        }
+        catch (final TransactionRolledBackException tre)
+        {
+            result = "Transaction rolled back" ;
+            System.out.println("Transaction rolled back") ;
+        }
+        catch (Exception e)
+        {
+            result = "Transaction failed! Cause: " + e.toString();
+            System.out.println("CLIENT: problem: ");
+            e.printStackTrace(System.out);
+        }
+
+        request.setAttribute("result", result);
+        context.getRequestDispatcher("/index.jsp").forward(request, response);
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Atomic Transaction type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testAtomicTransaction(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userTransaction...");
+
+        UserTransaction ut = UserTransactionFactory.userTransaction();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        ut.begin();
+
+        System.out.println("CLIENT: transaction ID= " + ut.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        restaurantAT.bookSeats(restaurantSeats);
+        theatreAT.bookSeats(theatreSeats, theatreArea);
+        if (bookTaxi)
+        {
+            taxiAT.bookTaxi();
+        }
+
+        System.out.println("CLIENT: calling commit on the transaction...");
+
+        ut.commit();
+
+        System.out.println("done.");
+        System.out.flush();
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Business Activity type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testBusinessActivity(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userBusinessActivity...");
+
+        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        uba.begin();
+
+        System.out.println("CLIENT: transaction ID= " + uba.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        boolean isOK = false ;
+        try
+        {
+            if (restaurantBA.bookSeats(restaurantSeats) && theatreBA.bookSeats(theatreSeats, theatreArea))
+            {
+                isOK = !bookTaxi || taxiBA.bookTaxi() ;
+            }
+        }
+        catch (final Throwable th)
+        {
+            System.out.println("CLIENT: caught exception processing bookings, cancelling (" + th.getMessage() + ")") ;
+        }
+
+        if (isOK)
+        {
+            System.out.println("CLIENT: all OK");
+            System.out.println("CLIENT: calling close on the transaction...");
+            uba.close();
+        }
+        else
+        {
+            System.out.println("CLIENT: one or more services failed, calling cancel.");
+            uba.cancel();
+        }
+
+        System.out.println("CLIENT: done.");
+        System.out.flush();
+    }
+
+    /**
+     * @param config The servlet config
+     * @param property The property name
+     * @param defautlValue The default value.
+     * @return The initialisation property value or the default value if not present. 
+     */
+    private String getURL(final ServletConfig config, final String property, final String defaultValue)
+    {
+        final String value = config.getInitParameter(property) ;
+        return (value == null ? defaultValue : value) ;
+    }
+    
+    /**
+     * Get the service proxy for the specified service endpoing.
+     * @param jndiName The JNDI location of the service.
+     * @param url The URL of the service.
+     * @param portClass The port class type.
+     * @throws NamingException For errors accessing JNDI.
+     * @throws ServiceException For errors creating proxy.
+     * @return The stub for the service endpoint.
+     */
+    private Stub getService(final String jndiName, final String url, final Class portClass)
+        throws NamingException, ServiceException
+    {
+        final InitialContext ic = new InitialContext() ;
+        final Service service = (Service)ic.lookup(jndiName) ;
+        final Stub stub = (Stub)service.getPort(portClass) ;
+        stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url) ;
+        return stub ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,36 @@
+/*
+ * 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.xts.nightout.clients.jboss.restaurant ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface IRestaurantServiceAT extends Remote
+{
+
+    /**
+     * Book a specified number of seats at the restaurant.
+     * @param numSeats The number of seats to book at the restaurant.
+     * @throws RemoteException for communication errors.
+     */
+    public void bookSeats(final int numSeats) throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.jboss.restaurant ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface IRestaurantServiceBA extends Remote
+{
+
+    /**
+     * Book a specified number of seats at the restaurant.
+     * @param numSeats The number of seats to book at the restaurant.
+     * @return true if successful, false otherwise
+     * @throws RemoteException for communication errors.
+     */
+    public boolean bookSeats(final int numSeats) throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,35 @@
+/*
+ * 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.xts.nightout.clients.jboss.taxi ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface ITaxiServiceAT extends Remote
+{
+
+    /**
+     * Book a taxi.
+     * @throws RemoteException for communication errors.
+     */
+    public void bookTaxi() throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,36 @@
+/*
+ * 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.xts.nightout.clients.jboss.taxi ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface ITaxiServiceBA extends Remote
+{
+
+    /**
+     * Book a taxi.
+     * @return true if successful, false otherwise.
+     * @throws RemoteException for communication errors.
+     */
+    public boolean bookTaxi() throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,38 @@
+/*
+ * 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.xts.nightout.clients.jboss.theatre ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface ITheatreServiceAT extends Remote
+{
+
+    /**
+     * Book a specified number of seats in a specific area of the theatre.
+     * @param numSeats The number of seats to book at the theatre.
+     * @param area The area of the seats.
+     * @throws RemoteException for communication errors.
+     */
+    public void bookSeats(final int numSeats, final int area)
+            throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,39 @@
+/*
+ * 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.xts.nightout.clients.jboss.theatre ;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException ;
+
+public interface ITheatreServiceBA extends Remote
+{
+
+    /**
+     * Book a specified number of seats in a specific area of the theatre.
+     * @param numSeats The number of seats to book at the theatre.
+     * @param area The area of the seats.
+     * @return true if successful, false otherwise.
+     * @throws RemoteException for communication errors.
+     */
+    public boolean bookSeats(final int numSeats, final int area)
+            throws RemoteException ;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/BasicClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/BasicClient.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,381 @@
+/*
+ * 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.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id$
+ *
+ */
+
+package com.arjuna.xts.nightout.clients.weblogic;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.HandlerInfo;
+
+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.client.JaxRPCHeaderContextProcessor;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceAT_Impl;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBA_Impl;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceAT_Impl;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBA_Impl;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceAT_Impl;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort;
+import com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBA_Impl;
+
+/**
+ * A very basic client application that drives the
+ * (transactional) Web Services to arrange a night out.
+ * <p/>
+ * This is a reworking of the axis client.
+ *
+ * @author Kevin Conner (kevin.conner at arjuna.com)
+ * @version $Id$
+ */
+public class BasicClient extends HttpServlet
+{
+    /**
+     * The base namespace for the demo.
+     */
+    private static final String DEMO_BASE_NAMESPACE = "http://www.arjuna.com/xtsdemo/nightout/" ;
+    /**
+     * The atomic transaction restaurant service qname.
+     */
+    private static final QName RESTAURANT_SERVICE_AT_QNAME = new QName(DEMO_BASE_NAMESPACE + "RestaurantServiceAT", "RestaurantServiceATPort") ;
+    /**
+     * The business activity restaurant service qname.
+     */
+    private static final QName RESTAURANT_SERVICE_BA_QNAME = new QName(DEMO_BASE_NAMESPACE + "RestaurantServiceBA", "RestaurantServiceBAPort") ;
+    /**
+     * The atomic transaction taxi service qname.
+     */
+    private static final QName TAXI_SERVICE_AT_QNAME = new QName(DEMO_BASE_NAMESPACE + "TaxiServiceAT", "TaxiServiceATPort") ;
+    /**
+     * The business activity taxi service qname.
+     */
+    private static final QName TAXI_SERVICE_BA_QNAME = new QName(DEMO_BASE_NAMESPACE + "TaxiServiceBA", "TaxiServiceBAPort") ;
+    /**
+     * The atomic transaction theatre service qname.
+     */
+    private static final QName THEATRE_SERVICE_AT_QNAME = new QName(DEMO_BASE_NAMESPACE + "TheatreServiceAT", "TheatreServiceATPort") ;
+    /**
+     * The business activity theatre service qname.
+     */
+    private static final QName THEATRE_SERVICE_BA_QNAME = new QName(DEMO_BASE_NAMESPACE + "TheatreServiceBA", "TheatreServiceBAPort") ;
+    
+    /**
+     * The servlet context.
+     */
+    private ServletContext context ;
+
+    /**
+     * The atomic transaction restaurant port.
+     */
+    private RestaurantServiceATPort restaurantAT;
+    /**
+     * The atomic transaction theatre port.
+     */
+    private TheatreServiceATPort theatreAT;
+    /**
+     * The atomic transaction taxi port.
+     */
+    private TaxiServiceATPort taxiAT;
+
+    /**
+     * The business activity restaurant port.
+     */
+    private RestaurantServiceBAPort restaurantBA;
+    /**
+     * The business activity theatre port.
+     */
+    private TheatreServiceBAPort theatreBA;
+    /**
+     * The business activity taxi port.
+     */
+    private TaxiServiceBAPort taxiBA;
+
+    /**
+     * URL of restaurant AT
+     */
+    private String restaurantATURL ;
+    /**
+     * URL of restaurant BA
+     */
+    private String restaurantBAURL ;
+    /**
+     * URL of taxi AT
+     */
+    private String taxiATURL ;
+    /**
+     * URL of taxi BA
+     */
+    private String taxiBAURL ;
+    /**
+     * URL of theatre AT
+     */
+    private String theatreATURL ;
+    /**
+     * URL of theatre BA
+     */
+    private String theatreBAURL ;
+
+    /**
+     * The initialised flag.
+     */
+    private boolean initialised ;
+
+    /**
+     * Initialise the servlet.
+     * @param servletConfig The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        final String baseURL = "http://localhost:7001/xtsdemowebservices/" ;
+
+        restaurantATURL = getURL(config, "restaurantATURL", baseURL + "RestaurantServiceAT?WSDL") ;
+        restaurantBAURL = getURL(config, "restaurantBAURL", baseURL + "RestaurantServiceBA?WSDL") ;
+        taxiATURL = getURL(config, "taxiATURL", baseURL + "TheatreServiceAT?WSDL") ;
+        taxiBAURL = getURL(config, "taxiBAURL", baseURL + "TheatreServiceBA?WSDL") ;
+        theatreATURL = getURL(config, "theatreATURL", baseURL + "TheatreServiceAT?WSDL") ;
+        theatreBAURL = getURL(config, "theatreBAURL", baseURL + "TheatreServiceBA?WSDL") ;
+
+        context = config.getServletContext();
+    }
+
+    /**
+     * Initialise if necessary
+     */
+    private synchronized void initialise()
+    throws ServletException
+    {
+        if (!initialised)
+        {
+            final List handlerList = new ArrayList() ;
+            handlerList.add(new HandlerInfo(JaxRPCHeaderContextProcessor.class, null, new QName[] {JaxRPCHeaderContextProcessor.HEADER_QNAME})) ;
+            try
+            {
+                final RestaurantServiceAT_Impl restaurantServiceAT_Impl = new RestaurantServiceAT_Impl(restaurantATURL) ;
+                restaurantServiceAT_Impl.getHandlerRegistry().setHandlerChain(RESTAURANT_SERVICE_AT_QNAME, handlerList) ;
+                restaurantAT = restaurantServiceAT_Impl.getRestaurantServiceATPort() ;
+                
+                final RestaurantServiceBA_Impl restaurantServiceBA_Impl = new RestaurantServiceBA_Impl(restaurantBAURL) ;
+                restaurantServiceBA_Impl.getHandlerRegistry().setHandlerChain(RESTAURANT_SERVICE_BA_QNAME, handlerList) ;
+                restaurantBA = restaurantServiceBA_Impl.getRestaurantServiceBAPort() ;
+                
+                final TaxiServiceAT_Impl taxiServiceAT_Impl = new TaxiServiceAT_Impl(taxiATURL) ;
+                taxiServiceAT_Impl.getHandlerRegistry().setHandlerChain(TAXI_SERVICE_AT_QNAME, handlerList) ;
+                taxiAT = taxiServiceAT_Impl.getTaxiServiceATPort() ;
+                
+                final TaxiServiceBA_Impl taxiServiceBA_Impl = new TaxiServiceBA_Impl(taxiBAURL) ;
+                taxiServiceBA_Impl.getHandlerRegistry().setHandlerChain(TAXI_SERVICE_BA_QNAME, handlerList) ;
+                taxiBA = taxiServiceBA_Impl.getTaxiServiceBAPort() ;
+                
+                final TheatreServiceAT_Impl theatreServiceAT_Impl = new TheatreServiceAT_Impl(theatreATURL) ;
+                theatreServiceAT_Impl.getHandlerRegistry().setHandlerChain(THEATRE_SERVICE_AT_QNAME, handlerList) ;
+                theatreAT = theatreServiceAT_Impl.getTheatreServiceATPort() ;
+                
+                final TheatreServiceBA_Impl theatreServiceBA_Impl = new TheatreServiceBA_Impl(theatreBAURL) ;
+                theatreServiceBA_Impl.getHandlerRegistry().setHandlerChain(THEATRE_SERVICE_BA_QNAME, handlerList) ;
+                theatreBA = theatreServiceBA_Impl.getTheatreServiceBAPort() ;
+            }
+            catch (final Exception ex)
+            {
+                ex.printStackTrace();
+                throw new ServletException(ex);
+            }
+            initialised = true ;
+        }
+    }
+
+    /**
+     * Simple wrapper to allow our test method to be invoked when
+     * running in a servlet container, taking parameters from the
+     * request URL and displaying the outcome on the resulting html page.
+     *
+     * @param request
+     * @param response
+     * @throws ServletException
+     * @throws IOException
+     */
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+    {
+        initialise() ;
+
+        // get business logic params from the form submission.
+        int restaurantSeats = Integer.parseInt(request.getParameter("restaurant"));
+        int theatreSeats = Integer.parseInt(request.getParameter("theatrecount"));
+        int theatreArea = Integer.parseInt(request.getParameter("theatrearea"));
+        int taxiCount = Integer.parseInt(request.getParameter("taxi"));
+        boolean bookTaxi = (taxiCount >= 1 ? true : false);
+
+        String result = "Transaction finished OK.";
+        String txType = request.getParameter("txType");
+
+        try
+        {
+            if ("AtomicTransaction".equals(txType))
+            {
+                testAtomicTransaction(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else if ("BusinessActivity".equals(txType))
+            {
+                testBusinessActivity(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else
+            {
+                result = "Unknown transaction type " + txType;
+            }
+        }
+        catch (Exception e)
+        {
+            result = "Transaction failed! Cause: " + e.toString();
+            System.out.println("CLIENT: problem: ");
+            e.printStackTrace(System.out);
+        }
+
+        request.setAttribute("result", result);
+        context.getRequestDispatcher("/index.jsp").forward(request, response);
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Atomic Transaction type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testAtomicTransaction(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userTransaction...");
+
+        UserTransaction ut = UserTransactionFactory.userTransaction();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        ut.begin();
+
+        System.out.println("CLIENT: transaction ID= " + ut.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        restaurantAT.bookSeats(restaurantSeats);
+        theatreAT.bookSeats(theatreSeats, theatreArea);
+        if (bookTaxi)
+        {
+            taxiAT.bookTaxi();
+        }
+
+        System.out.println("CLIENT: calling commit on the transaction...");
+
+        ut.commit();
+
+        System.out.println("done.");
+        System.out.flush();
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Business Activity type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testBusinessActivity(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userBusinessActivity...");
+
+        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        uba.begin();
+
+        System.out.println("CLIENT: transaction ID= " + uba.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        boolean isOK = false ;
+        try
+        {
+            if (restaurantBA.bookSeats(restaurantSeats) && theatreBA.bookSeats(theatreSeats, theatreArea))
+            {
+                isOK = !bookTaxi || taxiBA.bookTaxi() ;
+            }
+        }
+        catch (final Throwable th)
+        {
+            System.out.println("CLIENT: caught exception processing bookings, cancelling (" + th.getMessage() + ")") ;
+        }
+
+        if (isOK)
+        {
+            System.out.println("CLIENT: all OK");
+            System.out.println("CLIENT: calling close on the transaction...");
+            uba.close();
+        }
+        else
+        {
+            System.out.println("CLIENT: one or more services failed, calling cancel.");
+            uba.cancel();
+        }
+
+        System.out.println("CLIENT: done.");
+        System.out.flush();
+    }
+
+    /**
+     * @param config The servlet config
+     * @param property The property name
+     * @param defautlValue The default value.
+     * @return The initialisation property value or the default value if not present. 
+     */
+    private String getURL(final ServletConfig config, final String property, final String defaultValue)
+    {
+        final String value = config.getInitParameter(property) ;
+        return (value == null ? defaultValue : value) ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:31 BST 2004 */
+
+public interface RestaurantServiceAT extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort getRestaurantServiceATPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort getRestaurantServiceATPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:31 BST 2004 */
+
+public interface RestaurantServiceATPort extends java.rmi.Remote{
+
+  /**
+   * bookSeats 
+   */
+
+  public void bookSeats(int howMany) 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceATPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,54 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:31 BST 2004 */
+
+public class RestaurantServiceATPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort{
+
+  public RestaurantServiceATPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort.class );
+  }
+
+  /**
+   * bookSeats 
+   */
+
+  public void bookSeats(int howMany) 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    _args.put( "howMany", _wrap( howMany ) );
+           try{
+      java.lang.Object _result = _invoke( "bookSeats", _args );
+              } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:31 BST 2004 */
+
+public class RestaurantServiceAT_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceAT{
+
+  public RestaurantServiceAT_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceAT.wsdl" );
+  }
+
+  public RestaurantServiceAT_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceAT" );
+  }
+    //***********************************
+  // Port Name: RestaurantServiceATPort 
+  // Port Type: RestaurantServiceATPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort mvar_RestaurantServiceATPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort getRestaurantServiceATPort(){
+
+    if( mvar_RestaurantServiceATPort == null ){
+      mvar_RestaurantServiceATPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort_Stub( _getPort( "RestaurantServiceATPort" ) );
+    }
+
+    return mvar_RestaurantServiceATPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceATPort getRestaurantServiceATPort(String username, String password){
+
+    _setUser( username, password, getRestaurantServiceATPort() );
+
+    return getRestaurantServiceATPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:33 BST 2004 */
+
+public interface RestaurantServiceBA extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort getRestaurantServiceBAPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort getRestaurantServiceBAPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:33 BST 2004 */
+
+public interface RestaurantServiceBAPort extends java.rmi.Remote{
+
+  /**
+   * bookSeats 
+   */
+
+  public boolean bookSeats(int howMany) 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBAPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,55 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:33 BST 2004 */
+
+public class RestaurantServiceBAPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort{
+
+  public RestaurantServiceBAPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort.class );
+  }
+
+  /**
+   * bookSeats 
+   */
+
+  public boolean bookSeats(int howMany) 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    _args.put( "howMany", _wrap( howMany ) );
+           try{
+      java.lang.Object _result = _invoke( "bookSeats", _args );
+      return ((java.lang.Boolean)_result).booleanValue();
+        } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:33 BST 2004 */
+
+public class RestaurantServiceBA_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBA{
+
+  public RestaurantServiceBA_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/RestaurantServiceBA.wsdl" );
+  }
+
+  public RestaurantServiceBA_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBA" );
+  }
+    //***********************************
+  // Port Name: RestaurantServiceBAPort 
+  // Port Type: RestaurantServiceBAPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort mvar_RestaurantServiceBAPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort getRestaurantServiceBAPort(){
+
+    if( mvar_RestaurantServiceBAPort == null ){
+      mvar_RestaurantServiceBAPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort_Stub( _getPort( "RestaurantServiceBAPort" ) );
+    }
+
+    return mvar_RestaurantServiceBAPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.RestaurantServiceBAPort getRestaurantServiceBAPort(String username, String password){
+
+    _setUser( username, password, getRestaurantServiceBAPort() );
+
+    return getRestaurantServiceBAPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:35 BST 2004 */
+
+public interface TaxiServiceAT extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort getTaxiServiceATPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort getTaxiServiceATPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:35 BST 2004 */
+
+public interface TaxiServiceATPort extends java.rmi.Remote{
+
+  /**
+   * bookTaxi 
+   */
+
+  public void bookTaxi() 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceATPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,53 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:35 BST 2004 */
+
+public class TaxiServiceATPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort{
+
+  public TaxiServiceATPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort.class );
+  }
+
+  /**
+   * bookTaxi 
+   */
+
+  public void bookTaxi() 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    try{
+      java.lang.Object _result = _invoke( "bookTaxi", _args );
+              } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:35 BST 2004 */
+
+public class TaxiServiceAT_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceAT{
+
+  public TaxiServiceAT_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceAT.wsdl" );
+  }
+
+  public TaxiServiceAT_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceAT" );
+  }
+    //***********************************
+  // Port Name: TaxiServiceATPort 
+  // Port Type: TaxiServiceATPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort mvar_TaxiServiceATPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort getTaxiServiceATPort(){
+
+    if( mvar_TaxiServiceATPort == null ){
+      mvar_TaxiServiceATPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort_Stub( _getPort( "TaxiServiceATPort" ) );
+    }
+
+    return mvar_TaxiServiceATPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceATPort getTaxiServiceATPort(String username, String password){
+
+    _setUser( username, password, getTaxiServiceATPort() );
+
+    return getTaxiServiceATPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:37 BST 2004 */
+
+public interface TaxiServiceBA extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort getTaxiServiceBAPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort getTaxiServiceBAPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:37 BST 2004 */
+
+public interface TaxiServiceBAPort extends java.rmi.Remote{
+
+  /**
+   * bookTaxi 
+   */
+
+  public boolean bookTaxi() 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBAPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,54 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:37 BST 2004 */
+
+public class TaxiServiceBAPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort{
+
+  public TaxiServiceBAPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort.class );
+  }
+
+  /**
+   * bookTaxi 
+   */
+
+  public boolean bookTaxi() 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    try{
+      java.lang.Object _result = _invoke( "bookTaxi", _args );
+      return ((java.lang.Boolean)_result).booleanValue();
+        } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:37 BST 2004 */
+
+public class TaxiServiceBA_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBA{
+
+  public TaxiServiceBA_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/TaxiServiceBA.wsdl" );
+  }
+
+  public TaxiServiceBA_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBA" );
+  }
+    //***********************************
+  // Port Name: TaxiServiceBAPort 
+  // Port Type: TaxiServiceBAPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort mvar_TaxiServiceBAPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort getTaxiServiceBAPort(){
+
+    if( mvar_TaxiServiceBAPort == null ){
+      mvar_TaxiServiceBAPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort_Stub( _getPort( "TaxiServiceBAPort" ) );
+    }
+
+    return mvar_TaxiServiceBAPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TaxiServiceBAPort getTaxiServiceBAPort(String username, String password){
+
+    _setUser( username, password, getTaxiServiceBAPort() );
+
+    return getTaxiServiceBAPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:39 BST 2004 */
+
+public interface TheatreServiceAT extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort getTheatreServiceATPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort getTheatreServiceATPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:39 BST 2004 */
+
+public interface TheatreServiceATPort extends java.rmi.Remote{
+
+  /**
+   * bookSeats 
+   */
+
+  public void bookSeats(int howMany, int whichArea) 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceATPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,55 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:39 BST 2004 */
+
+public class TheatreServiceATPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort{
+
+  public TheatreServiceATPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort.class );
+  }
+
+  /**
+   * bookSeats 
+   */
+
+  public void bookSeats(int howMany, int whichArea) 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    _args.put( "howMany", _wrap( howMany ) );
+           _args.put( "whichArea", _wrap( whichArea ) );
+           try{
+      java.lang.Object _result = _invoke( "bookSeats", _args );
+              } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:39 BST 2004 */
+
+public class TheatreServiceAT_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceAT{
+
+  public TheatreServiceAT_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceAT.wsdl" );
+  }
+
+  public TheatreServiceAT_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceAT" );
+  }
+    //***********************************
+  // Port Name: TheatreServiceATPort 
+  // Port Type: TheatreServiceATPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort mvar_TheatreServiceATPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort getTheatreServiceATPort(){
+
+    if( mvar_TheatreServiceATPort == null ){
+      mvar_TheatreServiceATPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort_Stub( _getPort( "TheatreServiceATPort" ) );
+    }
+
+    return mvar_TheatreServiceATPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceATPort getTheatreServiceATPort(String username, String password){
+
+    _setUser( username, password, getTheatreServiceATPort() );
+
+    return getTheatreServiceATPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,40 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:41 BST 2004 */
+
+public interface TheatreServiceBA extends javax.xml.rpc.Service{
+
+  weblogic.webservice.context.WebServiceContext context();
+
+  weblogic.webservice.context.WebServiceContext joinContext() 
+       throws weblogic.webservice.context.ContextNotFoundException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort getTheatreServiceBAPort() throws javax.xml.rpc.ServiceException;
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort getTheatreServiceBAPort(String username, String password) throws javax.xml.rpc.ServiceException;
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,24 @@
+<!--
+  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.
+-->
+<wsdd:type-mapping  xmlns:wsdd="http://www.bea.com/servers/wls70"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+</wsdd:type-mapping>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,37 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated interface, do not edit.
+ *
+ * This stub interface was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:41 BST 2004 */
+
+public interface TheatreServiceBAPort extends java.rmi.Remote{
+
+  /**
+   * bookSeats 
+   */
+
+  public boolean bookSeats(int howMany, int whichArea) 
+       throws java.rmi.RemoteException ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort_Stub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort_Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBAPort_Stub.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,56 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+/**
+ * Generated class, do not edit.
+ *
+ * This stub class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:41 BST 2004 */
+
+public class TheatreServiceBAPort_Stub 
+     extends weblogic.webservice.core.rpc.StubImpl 
+     implements  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort{
+
+  public TheatreServiceBAPort_Stub( weblogic.webservice.Port _port ){
+    super( _port, com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort.class );
+  }
+
+  /**
+   * bookSeats 
+   */
+
+  public boolean bookSeats(int howMany, int whichArea) 
+       throws java.rmi.RemoteException {
+
+    java.util.HashMap _args = new java.util.HashMap();
+    _args.put( "howMany", _wrap( howMany ) );
+           _args.put( "whichArea", _wrap( whichArea ) );
+           try{
+      java.lang.Object _result = _invoke( "bookSeats", _args );
+      return ((java.lang.Boolean)_result).booleanValue();
+        } catch (javax.xml.rpc.JAXRPCException e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e.getLinkedCause() );
+    } catch (javax.xml.rpc.soap.SOAPFaultException e) {
+      throw new java.rmi.RemoteException( "SOAP Fault:" + e + "\nDetail:\n"+e.getDetail(), e );
+    } catch (java.lang.Throwable e) {
+      throw new java.rmi.RemoteException( e.getMessage(), e );    }
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA_Impl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA_Impl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA_Impl.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,73 @@
+/*
+ * 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.xts.nightout.clients.weblogic.proxies;
+
+/**
+ * Generated class, do not edit.
+ *
+ * This service class was generated by weblogic
+ * webservice stub gen on Wed Jul 21 12:42:41 BST 2004 */
+
+public class TheatreServiceBA_Impl 
+     extends weblogic.webservice.core.rpc.ServiceImpl 
+     implements com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBA{
+
+  public TheatreServiceBA_Impl() 
+       throws java.io.IOException{
+
+    this( "com/arjuna/xts/nightout/clients/weblogic/proxies/TheatreServiceBA.wsdl" );
+  }
+
+  public TheatreServiceBA_Impl( String wsdlurl ) 
+       throws java.io.IOException{
+
+    super( wsdlurl, "com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBA" );
+  }
+    //***********************************
+  // Port Name: TheatreServiceBAPort 
+  // Port Type: TheatreServiceBAPort  //***********************************
+
+  com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort mvar_TheatreServiceBAPort;
+
+
+  /**
+   * returns a port in this service 
+   *
+   */
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort getTheatreServiceBAPort(){
+
+    if( mvar_TheatreServiceBAPort == null ){
+      mvar_TheatreServiceBAPort = 
+        new com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort_Stub( _getPort( "TheatreServiceBAPort" ) );
+    }
+
+    return mvar_TheatreServiceBAPort;
+
+  }
+
+  public com.arjuna.xts.nightout.clients.weblogic.proxies.TheatreServiceBAPort getTheatreServiceBAPort(String username, String password){
+
+    _setUser( username, password, getTheatreServiceBAPort() );
+
+    return getTheatreServiceBAPort();
+  }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/webmethods/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/webmethods/BasicClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/clients/webmethods/BasicClient.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,331 @@
+/*
+ * 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.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id$
+ *
+ */
+package com.arjuna.xts.nightout.clients.webmethods ;
+
+
+import java.io.IOException;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+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.xts.nightout.services.Restaurant.IRestaurantService;
+import com.arjuna.xts.nightout.services.Restaurant.IRestaurantServiceBA;
+import com.arjuna.xts.nightout.services.Taxi.ITaxiService;
+import com.arjuna.xts.nightout.services.Taxi.ITaxiServiceBA;
+import com.arjuna.xts.nightout.services.Theatre.ITheatreService;
+import com.arjuna.xts.nightout.services.Theatre.ITheatreServiceBA;
+
+import electric.registry.Registry;
+
+
+/**
+ * A very basic client application that drives the
+ * (transactional) Web Services to arrange a night out.
+ * <p/>
+ * This is a reworking of the axis client.
+ *
+ * @author Malik SAHEB (malik.saheb at arjuna.com)
+ * @version $Id$
+ */
+public class BasicClient extends HttpServlet
+{
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = -5260691945398399633L ;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext context ;
+
+    /**
+     * The atomic transaction restaurant stub.
+     */
+    private IRestaurantService restaurantAT;
+    /**
+     * The atomic transaction theatre stub.
+     */
+    private ITheatreService theatreAT;
+    /**
+     * The atomic transaction taxi stub.
+     */
+    private ITaxiService taxiAT;
+    /**
+     * The business activity restaurant stub.
+     */
+    private IRestaurantServiceBA restaurantBA;
+    /**
+     * The business activity theatre stub.
+     */
+    private ITheatreServiceBA theatreBA;
+    /**
+     * The business activity taxi stub.
+     */
+    private ITaxiServiceBA taxiBA;
+
+    /**
+     * URL of restaurant AT
+     */
+    private String restaurantATURL ;
+    /**
+     * URL of restaurant BA
+     */
+    private String restaurantBAURL ;
+    /**
+     * URL of taxi AT
+     */
+    private String taxiATURL ;
+    /**
+     * URL of taxi BA
+     */
+    private String taxiBAURL ;
+    /**
+     * URL of theatre AT
+     */
+    private String theatreATURL ;
+    /**
+     * URL of theatre BA
+     */
+    private String theatreBAURL ;
+
+    /**
+     * The initialised flag.
+     */
+    private boolean initialised ;
+
+    /**
+     * Initialise the servlet.
+     * @param servletConfig The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        final String baseURL = "http://localhost:8004/xts-demo/services/" ;
+
+        restaurantATURL = getURL(config, "restaurantATURL", baseURL + "RestaurantServiceAT.wsdl") ;
+        restaurantBAURL = getURL(config, "restaurantBAURL", baseURL + "RestaurantServiceBA.wsdl") ;
+        taxiATURL = getURL(config, "taxiATURL", baseURL + "TheatreServiceAT.wsdl") ;
+        taxiBAURL = getURL(config, "taxiBAURL", baseURL + "TheatreServiceBA.wsdl") ;
+        theatreATURL = getURL(config, "theatreATURL", baseURL + "TheatreServiceAT.wsdl") ;
+        theatreBAURL = getURL(config, "theatreBAURL", baseURL + "TheatreServiceBA.wsdl") ;
+
+        context = config.getServletContext();
+    }
+
+    /**
+     * Initialise if necessary
+     */
+    private synchronized void initialise()
+	throws ServletException
+    {
+	if (!initialised)
+	{
+	    try 
+	    {
+                restaurantAT = (IRestaurantService)Registry.bind(restaurantATURL, IRestaurantService.class) ;
+                restaurantBA = (IRestaurantServiceBA)Registry.bind(restaurantBAURL,IRestaurantServiceBA.class) ;
+                
+                taxiAT = (ITaxiService)Registry.bind(taxiATURL, ITaxiService.class) ;
+                taxiBA = (ITaxiServiceBA)Registry.bind(taxiBAURL, ITaxiServiceBA.class) ;
+                
+                theatreAT = (ITheatreService)Registry.bind(theatreATURL, ITheatreService.class) ;
+                theatreBA = (ITheatreServiceBA)Registry.bind(theatreBAURL, ITheatreServiceBA.class) ;
+	    }
+            catch (final Exception ex)
+            {
+	        ex.printStackTrace();
+                throw new ServletException(ex);
+            }
+	    initialised = true ;
+	}
+    }
+
+    /**
+     * Simple wrapper to allow our test method to be invoked when
+     * running in a servlet container, taking parameters from the
+     * request URL and displaying the outcome on the resulting html page.
+     *
+     * @param request
+     * @param response
+     * @throws ServletException
+     * @throws IOException
+     */
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+    {
+	initialise() ;
+
+        // get business logic params from the form submission.
+        int restaurantSeats = Integer.parseInt(request.getParameter("restaurant"));
+        int theatreSeats = Integer.parseInt(request.getParameter("theatrecount"));
+        int theatreArea = Integer.parseInt(request.getParameter("theatrearea"));
+        int taxiCount = Integer.parseInt(request.getParameter("taxi"));
+        boolean bookTaxi = (taxiCount >= 1 ? true : false);
+
+        String result = "Transaction finished OK.";
+        String txType = request.getParameter("txType");
+
+        try
+        {
+            if ("AtomicTransaction".equals(txType))
+            {
+                testAtomicTransaction(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else if ("BusinessActivity".equals(txType))
+            {
+                testBusinessActivity(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else
+            {
+                result = "Unknown transaction type " + txType;
+            }
+        }
+        catch (Exception e)
+        {
+            result = "Transaction failed! Cause: " + e.toString();
+            System.out.println("CLIENT: problem: ");
+            e.printStackTrace(System.out);
+        }
+
+        request.setAttribute("result", result);
+        context.getRequestDispatcher("/index.jsp").forward(request, response);
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Atomic Transaction type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testAtomicTransaction(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userTransaction...");
+
+        UserTransaction ut = UserTransactionFactory.userTransaction();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        ut.begin();
+
+        System.out.println("CLIENT: transaction ID= " + ut.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        restaurantAT.bookSeats(restaurantSeats);
+        theatreAT.bookSeats(theatreSeats, theatreArea);
+        if (bookTaxi)
+        {
+            taxiAT.bookTaxi();
+        }
+
+        System.out.println("CLIENT: calling commit on the transaction...");
+
+        ut.commit();
+
+        System.out.println("done.");
+        System.out.flush();
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Business Activity type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testBusinessActivity(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userBusinessActivity...");
+
+        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        uba.begin();
+
+        System.out.println("CLIENT: transaction ID= " + uba.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        boolean isOK = false ;
+        try
+        {
+            if (restaurantBA.bookSeats(restaurantSeats) && theatreBA.bookSeats(theatreSeats, theatreArea))
+            {
+                isOK = !bookTaxi || taxiBA.bookTaxi() ;
+            }
+        }
+        catch (final Throwable th)
+        {
+            System.out.println("CLIENT: caught exception processing bookings, cancelling (" + th.getMessage() + ")") ;
+        }
+
+        if (isOK)
+        {
+            System.out.println("CLIENT: all OK");
+            System.out.println("CLIENT: calling close on the transaction...");
+            uba.close();
+        }
+        else
+        {
+            System.out.println("CLIENT: one or more services failed, calling cancel.");
+            uba.cancel();
+        }
+
+        System.out.println("CLIENT: done.");
+        System.out.flush();
+    }
+
+    /**
+     * @param config The servlet config
+     * @param property The property name
+     * @param defautlValue The default value.
+     * @return The initialisation property value or the default value if not present. 
+     */
+    private String getURL(final ServletConfig config, final String property, final String defaultValue)
+    {
+        final String value = config.getInitParameter(property) ;
+        return (value == null ? defaultValue : value) ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,34 @@
+/*
+ * 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.xts.nightout.services.Restaurant;
+
+public interface IRestaurantService
+{
+     /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book
+     */
+    public void bookSeats(int how_many);
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,34 @@
+/*
+ * 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.xts.nightout.services.Restaurant;
+
+public interface IRestaurantServiceBA
+{
+     /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book
+     */
+    public boolean bookSeats(int how_many);
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,456 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: RestaurantManager.java,v 1.3 2004/04/21 13:09:18 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+import java.util.Hashtable;
+
+/**
+ * The transactional application logic for the Restaurant Service.
+ * <p/>
+ * Stores and manages seating reservations. Knows nothing about Web Services.
+ * Understands transactional booking lifecycle: unprepared, prepared, finished.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class RestaurantManager
+{
+    /**
+     * Create and initialise a new RestaurantManager instance.
+     */
+    public RestaurantManager()
+    {
+        setToDefault();
+    }
+
+    /**
+     * Book a number of seats in the restaurant.
+     *
+     * @param txID   The transaction identifier
+     * @param nSeats The number of seats requested
+     */
+    public void bookSeats(Object txID, int nSeats)
+    {
+        // locate any pre-existing request for the same transaction
+        Integer request = (Integer) unpreparedTransactions.get(txID);
+        if (request == null)
+        {
+            // this is the first request for this transaction
+            // setup the data structure to record it
+            request = new Integer(0);
+        }
+
+        // record the request, keyed to its transaction scope
+        request = new Integer(request.intValue() + nSeats);
+        unpreparedTransactions.put(txID, request);
+
+        // record the increased commitment to provide seating
+        nBookedSeats += nSeats;
+    }
+
+    /**
+     * Attempt to ensure availability of the requested seating.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean prepareSeats(Object txID)
+    {
+        // ensure that we have seen this transaction before
+        Integer request = (Integer) unpreparedTransactions.get(txID);
+        if (request == null)
+        {
+            return false; // error: transaction not registered
+        }
+        else
+        {
+            if (autoCommitMode)
+            {
+                if (request.intValue() <= nFreeSeats)
+                {
+                    // record the prepared transaction
+                    preparedTransactions.put(txID, request);
+                    unpreparedTransactions.remove(txID);
+                    // mark the prepared seats as unavailable
+                    nFreeSeats -= request.intValue();
+                    nPreparedSeats += request.intValue();
+                    return true;
+                }
+                else
+                {
+                    // we don't have enough seats available
+                    return false;
+                }
+            }
+            else
+            {
+                try
+                {
+                    // wait for a user commit/rollback decision
+                    isPreparationWaiting = true;
+                    synchronized (preparation)
+                    {
+                        preparation.wait();
+                    }
+                    isPreparationWaiting = false;
+
+                    // process the user decision
+                    if (isCommit)
+                    {
+                        // record the prepared transaction
+                        preparedTransactions.put(txID, request);
+                        unpreparedTransactions.remove(txID);
+                        // mark the prepared seats as unavailable
+                        nFreeSeats -= request.intValue();
+                        nPreparedSeats += request.intValue();
+                        return true;
+                    }
+                    else
+                    {
+                        return false;
+                    }
+                }
+                catch (Exception e)
+                {
+                    System.err.println("RestaurantManager.prepareSeats(): Unable to stop preparation.");
+                    return false;
+                }
+            }
+        }
+    }
+
+    /**
+     * Release booked or prepared seats.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean cancelSeats(Object txID)
+    {
+        boolean success = false;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+            // undo the prepare operations
+            Integer request = (Integer) preparedTransactions.remove(txID);
+            nFreeSeats += request.intValue();
+            nPreparedSeats -= request.intValue();
+            nBookedSeats -= request.intValue();
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // undo the booking operations
+            Integer request = (Integer) unpreparedTransactions.remove(txID);
+            nBookedSeats -= request.intValue();
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Commit seat bookings.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean commitSeats(Object txID)
+    {
+        boolean success = false;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+            // complete the prepared transaction
+            Integer request = (Integer) preparedTransactions.remove(txID);
+            nCommittedSeats += request.intValue();
+            nPreparedSeats -= request.intValue();
+            nBookedSeats -= request.intValue();
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // use one phase commit optimisation, skipping prepare
+            Integer request = (Integer) unpreparedTransactions.remove(txID);
+            nCommittedSeats += request.intValue();
+            nFreeSeats -= request.intValue();
+            nBookedSeats -= request.intValue();
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Determine if a specific transaction is known to the business logic.
+     *
+     * @param txID The uniq id for the transaction
+     * @return true if the business logic is holding state related to the given txID,
+     *         false otherwise.
+     */
+    public boolean knowsAbout(Object txID)
+    {
+        return (unpreparedTransactions.containsKey(txID) || preparedTransactions.containsKey(txID));
+    }
+
+    /**
+     * Change the capacity of the Resaurant.
+     *
+     * @param nSeats The new capacity
+     */
+    public void newCapacity(int nSeats)
+    {
+        nFreeSeats += nSeats - nTotalSeats;
+        nTotalSeats = nSeats;
+    }
+
+    /**
+     * Get the number of free seats.
+     *
+     * @return The number of free seats
+     */
+    public int getNFreeSeats()
+    {
+        return nFreeSeats;
+    }
+
+    /**
+     * Get the total number of seats.
+     *
+     * @return The total number of seats
+     */
+    public int getNTotalSeats()
+    {
+        return nTotalSeats;
+    }
+
+    /**
+     * Get the number of booked seats in the given area.
+     *
+     * @return The number of booked seats
+     */
+    public int getNBookedSeats()
+    {
+        return nBookedSeats;
+    }
+
+    /**
+     * Get the number of prepared seats.
+     *
+     * @return The number of prepared seats
+     */
+    public int getNPreparedSeats()
+    {
+        return nPreparedSeats;
+    }
+
+    /**
+     * Get the number of committed seats in the given area.
+     *
+     * @return The number of committed seats
+     */
+    public int getNCommittedSeats()
+    {
+        return nCommittedSeats;
+    }
+
+    /**
+     * Determine the autoCommit status of the instance.
+     *
+     * @return true if autoCommit mode is active, false otherwise
+     */
+    public boolean isAutoCommitMode()
+    {
+        return autoCommitMode;
+    }
+
+    /**
+     * Set the autoCommit mode of the instance.
+     *
+     * @param autoCommit true for automatic commit, false for manual commit.
+     */
+    public void setAutoCommitMode(boolean autoCommit)
+    {
+        autoCommitMode = autoCommit;
+    }
+
+    /**
+     * Get the preparation object for manual commit wait/notify.
+     *
+     * @return The preparation object
+     */
+    public Object getPreparation()
+    {
+        return preparation;
+    }
+
+    /**
+     * Determine if the instance is waiting for manual commit/rollback.
+     *
+     * @return true if waiting, false otherwise
+     */
+    public boolean getIsPreparationWaiting()
+    {
+        return isPreparationWaiting;
+    }
+
+    /**
+     * Set the waiting status of the instance.
+     *
+     * @param isWaiting The new value to set
+     */
+    public void setIsPreparationWaiting(boolean isWaiting)
+    {
+        isPreparationWaiting = isWaiting;
+    }
+
+    /**
+     * Set the manual commit status.
+     *
+     * @param commit true for commitment, false for rollback
+     */
+    public void setCommit(boolean commit)
+    {
+        isCommit = commit;
+    }
+
+    /**
+     * (re-)initialise the instance data structures.
+     */
+    public void setToDefault()
+    {
+        nTotalSeats = DEFAULT_SEATING_CAPACITY;
+        nFreeSeats = nTotalSeats;
+        nBookedSeats = 0;
+        nPreparedSeats = 0;
+        nCommittedSeats = 0;
+        preparedTransactions = new Hashtable();
+        unpreparedTransactions = new Hashtable();
+        autoCommitMode = true;
+        preparation = new Object();
+        isPreparationWaiting = false;
+        isCommit = true;
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     *
+     * @return the singleton RestaurantManager instance.
+     */
+    public static RestaurantManager getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new RestaurantManager();
+        }
+
+        return singletonInstance;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static RestaurantManager singletonInstance;
+
+    /**
+     * The total seating capacity.
+     */
+    private int nTotalSeats;
+
+    /**
+     * The number of free seats.
+     */
+    private int nFreeSeats;
+
+    /**
+     * The number of booked seats.
+     * <p/>
+     * Note: This may exceed the total seating capacity
+     */
+    private int nBookedSeats;
+
+    /**
+     * The number of prepared (promised) seats.
+     */
+    private int nPreparedSeats;
+    /**
+     * The number of committed seats in each area.
+     */
+    private int nCommittedSeats;
+
+    /**
+     * The auto commit mode.
+     * <p/>
+     * true = automatically commit, false = manually commit
+     */
+    private boolean autoCommitMode;
+
+    /**
+     * The object used for wait/notify in manual commit mode.
+     */
+    private Object preparation;
+
+    /**
+     * The waiting status, when in manual commit mode.
+     */
+    private boolean isPreparationWaiting;
+
+    /**
+     * The user specified outcome when in manual commit mode.
+     */
+    private boolean isCommit;
+
+    /**
+     * The transactions we know about but which have not been prepared.
+     */
+    private Hashtable unpreparedTransactions;
+
+    /**
+     * The transactions we know about and are prepared to commit.
+     */
+    private Hashtable preparedTransactions;
+
+    /**
+     * The default initial capacity of each seating area.
+     */
+    public static final int DEFAULT_SEATING_CAPACITY = 100;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: RestaurantParticipantAT.java,v 1.3 2005/02/23 09:58:01 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+import com.arjuna.wst.*;
+
+/**
+ * An adapter class that exposes the RestaurantManager transaction lifecycle
+ * API as a WS-T Atomic Transaction participant.
+ * Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class RestaurantParticipantAT implements Durable2PCParticipant
+{
+    /**
+     * Participant instances are related to transaction instances
+     * in a one to one manner.
+     *
+     * @param txID uniq id String for the transaction instance.
+     */
+    public RestaurantParticipantAT(String txID)
+    {
+        // Binds to the singleton RestaurantView and RestaurantManager
+        restaurantManager = RestaurantManager.getSingletonInstance();
+        restaurantView = RestaurantView.getSingletonInstance();
+        // we need to save the txID for later use when calling
+        // business logic methods in the restaurantManger.
+        this.txID = txID;
+    }
+
+    /**
+     * Invokes the prepare step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @return Prepared where possible, Aborted where necessary.
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public Vote prepare() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the prepare operation
+        // on the backend business logic.
+
+        System.out.println("RestaurantParticipantAT.prepare");
+
+        restaurantView.addPrepareMessage("id:" + txID + ". Prepare called on participant: " + this.getClass().toString());
+
+        boolean success = restaurantManager.prepareSeats(txID);
+
+        // Log the outcome and map the return value from
+        // the business logic to the appropriate Vote type.
+
+        if (success)
+        {
+            restaurantView.addMessage("Seats prepared successfully. Returning 'Prepared'\n");
+            restaurantView.updateFields();
+            return new Prepared();
+        }
+        else
+        {
+            restaurantManager.cancelSeats(txID) ;
+            restaurantView.addMessage("Prepare failed (not enough seats?) Returning 'Aborted'\n");
+            restaurantView.updateFields();
+            return new Aborted();
+        }
+    }
+
+    /**
+     * Invokes the commit step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commit() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the commit operation
+        // on the backend business logic.
+
+        System.out.println("RestaurantParticipantAT.commit");
+
+        restaurantView.addMessage("id:" + txID + ". Commit called on participant: " + this.getClass().toString());
+
+        boolean success = restaurantManager.commitSeats(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            restaurantView.addMessage("Seats committed\n");
+        }
+        else
+        {
+            restaurantView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        restaurantView.updateFields();
+    }
+
+    /**
+     * Invokes the rollback operation on the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void rollback() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the rollback operation
+        // on the backend business logic.
+
+        System.out.println("RestaurantParticipantAT.rollback");
+
+        restaurantView.addMessage("id:" + txID + ". Rollback called on participant: " + this.getClass().toString());
+
+        boolean success = restaurantManager.cancelSeats(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            restaurantView.addMessage("Seats booking cancelled\n");
+        }
+        else
+        {
+            restaurantView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        restaurantView.updateFields();
+    }
+
+    /**
+     * Shortcut method which combines the prepare
+     * and commit steps in a single operation.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commitOnePhase() throws WrongStateException, SystemException
+    {
+        prepare();
+        commit();
+    }
+
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is passed to the backend business logic methods.
+     */
+    protected String txID;
+
+    /**
+     * The RestaurantView object to log events through.
+     */
+    protected static RestaurantView restaurantView;
+
+    /**
+     * The RestaurantManager to perform business logic operations on.
+     */
+    protected static RestaurantManager restaurantManager;
+}
+


Property changes on: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,189 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: RestaurantParticipantBA.java,v 1.3 2004/09/09 15:18:09 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+import com.arjuna.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * An adapter class that exposes the RestaurantManager transaction lifecycle
+ * API as a WS-T Business Activity participant.
+ * Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class RestaurantParticipantBA implements BusinessAgreementWithParticipantCompletionParticipant
+{
+    /**
+     * Participant instances are related to business method calls
+     * in a one to one manner.
+     *
+     * @param txID     uniq id String for the transaction instance.
+     * @param how_many seats to book/compensate.
+     */
+    public RestaurantParticipantBA(String txID, int how_many)
+    {
+        // Binds to the singleton RestaurantView and RestaurantManager
+        restaurantManager = RestaurantManager.getSingletonInstance();
+        restaurantView = RestaurantView.getSingletonInstance();
+        // we need to save the txID for later use when logging.
+        this.txID = txID;
+        // we also need the business paramater(s) in case of compensation
+        this.seatCount = how_many;
+    }
+
+    /**
+     * The transaction has completed successfully. The participant previously
+     * informed the coordinator that it was ready to complete.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void close() throws WrongStateException, SystemException
+    {
+        // for logging only. This impl does not do anything else here.
+
+        System.out.println("RestaurantParticipantBA.close");
+
+        restaurantView.addMessage("id:" + txID + ". Close called on participant: " + this.getClass());
+        restaurantView.updateFields();
+    }
+
+
+    /**
+     * The transaction has cancelled, and the participant should undo any work.
+     * The participant cannot have informed the coordinator that it has
+     * completed.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void cancel() throws WrongStateException, SystemException
+    {
+        // we will always have called completed or error, so this can be a null op.
+
+        System.out.println("RestaurantParticipantBA.cancel");
+
+        restaurantView.addMessage("id:" + txID + ". Cancel called on participant: " + this.getClass().toString());
+        restaurantView.updateFields();
+    }
+
+    /**
+     * The transaction has cancelled. The participant previously
+     * informed the coordinator that it had finished work but could compensate
+     * later if required, so it is now requested to do so.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException if unable to perform the compensating transaction.
+     */
+
+    public void compensate() throws WrongStateException, SystemException
+    {
+        System.out.println("RestaurantParticipantBA.compensate");
+
+        // Log the event and perform a compensating transaction
+        // on the backend business logic.
+
+        restaurantView.addPrepareMessage("id:" + txID + ". Compensate called on participant: " + this.getClass().toString());
+        restaurantView.updateFields();
+
+        if (seatCount > 0)
+        {
+            String compensatingTxID = new Uid().toString();
+            // use a negative number of seats to 'reverse' the previous booking
+            // This technique (hack) prevents us needing new business logic to support compensation.
+            restaurantManager.bookSeats(compensatingTxID, seatCount * -1);
+            restaurantView.updateFields();
+
+            boolean success = false;
+            if(restaurantManager.prepareSeats(compensatingTxID))
+            {
+                if (restaurantManager.commitSeats(compensatingTxID))
+                {
+                    restaurantView.addMessage("id:" + txID + " Compensating transaction completed sucessfully.");
+                    restaurantView.updateFields();
+                    success = true;
+                }
+            }
+            else
+            {
+                restaurantManager.cancelSeats(compensatingTxID);
+            }
+
+            if(!success)
+            {
+                restaurantView.addMessage("id:" + txID + " Compensation failed. Throwing SystemException\n");
+                restaurantView.updateFields();
+                throw new SystemException("Compensating transaction failed.");
+            }
+        }
+    }
+
+    public String status()
+    {
+        return Status.STATUS_ACTIVE ;
+    }
+    
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is used in informational log messages.
+     */
+    protected String txID;
+
+    /**
+     * Copy of business state information, may be needed during compensation.
+     */
+    protected int seatCount;
+
+    /**
+     * The RestaurantView object to log events through.
+     */
+    protected static RestaurantView restaurantView;
+
+    /**
+     * The RestaurantManager to perform business logic operations on.
+     */
+    protected static RestaurantManager restaurantManager;
+}
+

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd
+ *
+ * $Id: RestaurantServiceAT.java,v 1.3 2004/12/01 16:26:44 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManagerFactory;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * An adapter class that exposes the RestaurantManager business API as a
+ * transactional Web Service. Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class RestaurantServiceAT implements IRestaurantService
+{
+    /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book
+     */
+    public void bookSeats(int how_many)
+    {
+        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
+        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("RestaurantServiceAT transaction id =" + transactionId);
+
+            if (!restaurantManager.knowsAbout(transactionId))
+            {
+                System.out.println("RestaurantServiceAT - enrolling...");
+                // enlist the Participant for this service:
+                RestaurantParticipantAT restaurantParticipant = new RestaurantParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookSeats: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        restaurantView.addMessage("******************************");
+
+        restaurantView.addMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
+
+        restaurantManager.bookSeats(transactionId, how_many);
+
+        restaurantView.addMessage("Request complete\n");
+        restaurantView.updateFields();
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,137 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd
+ *
+ * $Id: RestaurantServiceBA.java,v 1.5 2004/12/01 16:26:44 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+import com.arjuna.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst.BusinessActivityManager;
+import com.arjuna.mw.wst.BusinessActivityManagerFactory;
+
+/**
+ * An adapter class that exposes the RestaurantManager business API as a
+ * transactional Web Service. Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+public class RestaurantServiceBA implements IRestaurantServiceBA
+{
+    /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary and passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book.
+     * @return true on success, false otherwise.
+     */
+    public boolean bookSeats(int how_many)
+    {
+        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
+        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookSeats: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        // log the event:
+        System.out.println("RestaurantServiceBA transaction id =" + transactionId);
+
+        restaurantView.addMessage("******************************");
+
+        restaurantView.addPrepareMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
+        restaurantView.updateFields();
+
+        // invoke the backend business logic:
+        restaurantManager.bookSeats(transactionId, how_many);
+
+        // attempt to finalise the booking
+        // (it will be compensated later if necessary)
+        if (restaurantManager.prepareSeats(transactionId))
+        {
+            restaurantView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            restaurantView.updateFields();
+
+            // it worked, so now we need a participant enlisted in case of compensation:
+
+            RestaurantParticipantBA restaurantParticipant = new RestaurantParticipantBA(transactionId, how_many);
+            // enlist the Participant for this service:
+            BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(restaurantParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                restaurantView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookSeats: Participant enlistment failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            // finish the booking in the backend:
+            restaurantManager.commitSeats(transactionId);
+
+            try
+            {
+                // tell the manager we have finished our work:
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookSeats: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            restaurantView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
+            restaurantManager.cancelSeats(transactionId);
+            restaurantView.updateFields();
+            return false;
+        }
+
+        restaurantView.addMessage("Request complete\n");
+        restaurantView.updateFields();
+
+        return true;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,470 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: RestaurantView.java,v 1.2 2004/04/21 13:09:18 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Restaurant;
+
+/**
+ * The visual interface (GUI) for the Restaurant Service.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.2 $
+ */
+public class RestaurantView extends javax.swing.JFrame
+{
+    // Note: Some parts of this file were auto-generated
+    // by NetBeans 3.3 FormEditor (http://www.netbeans.org)
+
+    /**
+     * Create a new RestaurantView instance.
+     *
+     * @param rManager The {@link RestaurantManager} instance to bind to
+     */
+    public RestaurantView(RestaurantManager rManager)
+    {
+        restManager = rManager;
+        initComponents();
+        updateFields();
+        backButtonColor = jButtonConfirm.getBackground();
+    }
+
+    /**
+     * Initialize the form.
+     * This is called by the constructor
+     * <p/>
+     * WARNING: Automatically generated code, may be overwritten
+     */
+    private void initComponents()
+    {//GEN-BEGIN:initComponents
+        jPanel2 = new javax.swing.JPanel();
+        jLabel5 = new javax.swing.JLabel();
+        jLabelNBookedSeats = new javax.swing.JLabel();
+        jLabel9 = new javax.swing.JLabel();
+        jLabelNPreparedSeats = new javax.swing.JLabel();
+        jLabel2 = new javax.swing.JLabel();
+        jLabelNConfirmedSeats = new javax.swing.JLabel();
+        jLabel6 = new javax.swing.JLabel();
+        jLabelNFreeSeats = new javax.swing.JLabel();
+        jLabel7 = new javax.swing.JLabel();
+        jButtonResetFields = new javax.swing.JButton();
+        jPanel1 = new javax.swing.JPanel();
+        jLabel8 = new javax.swing.JLabel();
+        jLabel1 = new javax.swing.JLabel();
+        jLabelNTotalSeats = new javax.swing.JLabel();
+        jLabel4 = new javax.swing.JLabel();
+        jLabel3 = new javax.swing.JLabel();
+        jTextFieldNewNTotalSeats = new javax.swing.JTextField();
+        jButtonSetNTotalSeats = new javax.swing.JButton();
+        jPanelLeft = new javax.swing.JPanel();
+        jLabel10 = new javax.swing.JLabel();
+        jLabelDisplayMode = new javax.swing.JLabel();
+        jButtonChangeMode = new javax.swing.JButton();
+        jLabelResponse = new javax.swing.JLabel();
+        jButtonConfirm = new javax.swing.JButton();
+        jButtonCancel = new javax.swing.JButton();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTextArea = new javax.swing.JTextArea();
+
+        setTitle("Restaurant Service");
+        setName("restaurantView");
+        addWindowListener(new java.awt.event.WindowAdapter()
+        {
+            public void windowClosing(java.awt.event.WindowEvent evt)
+            {
+                exitForm(evt);
+            }
+        });
+
+        jPanel2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+        jLabel5.setText("Seats: ");
+        jLabel5.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel2.add(jLabel5);
+
+        jLabelNBookedSeats.setText(Integer.toString(restManager.getNBookedSeats()));
+        jLabelNBookedSeats.setForeground(java.awt.Color.gray);
+        jLabelNBookedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel2.add(jLabelNBookedSeats);
+
+        jLabel9.setText("Booked,    ");
+        jPanel2.add(jLabel9);
+
+        jLabelNPreparedSeats.setText(Integer.toString(restManager.getNPreparedSeats()));
+        jLabelNPreparedSeats.setForeground(java.awt.Color.darkGray);
+        jLabelNPreparedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel2.add(jLabelNPreparedSeats);
+
+        jLabel2.setText("Prepared,    ");
+        jPanel2.add(jLabel2);
+
+        jLabelNConfirmedSeats.setText(Integer.toString(restManager.getNCommittedSeats()));
+        jLabelNConfirmedSeats.setForeground(new java.awt.Color(0, 51, 204));
+        jLabelNConfirmedSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel2.add(jLabelNConfirmedSeats);
+
+        jLabel6.setText("Confirmed,    ");
+        jPanel2.add(jLabel6);
+
+        jLabelNFreeSeats.setText(Integer.toString(restManager.getNFreeSeats()));
+        jLabelNFreeSeats.setForeground(new java.awt.Color(0, 153, 0));
+        jLabelNFreeSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel2.add(jLabelNFreeSeats);
+
+        jLabel7.setText("Free            ");
+        jPanel2.add(jLabel7);
+
+        jButtonResetFields.setText("Reset Fields");
+        jButtonResetFields.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonResetFieldsActionPerformed(evt);
+            }
+        });
+
+        jPanel2.add(jButtonResetFields);
+
+        getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
+
+        jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+        jLabel8.setText("Restaurant              ");
+        jLabel8.setForeground(java.awt.Color.red);
+        jLabel8.setFont(new java.awt.Font("Dialog", 1, 24));
+        jPanel1.add(jLabel8);
+
+        jLabel1.setText("Capacity:");
+        jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel1);
+
+        jLabelNTotalSeats.setText(Integer.toString(restManager.getNTotalSeats()));
+        jLabelNTotalSeats.setForeground(java.awt.Color.darkGray);
+        jLabelNTotalSeats.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel1.add(jLabelNTotalSeats);
+
+        jLabel4.setText("seats");
+        jLabel4.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel4);
+
+        jLabel3.setText("                   New capacity:");
+        jLabel3.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel3);
+
+        jTextFieldNewNTotalSeats.setFont(new java.awt.Font("Dialog", 0, 18));
+        jTextFieldNewNTotalSeats.setText(Integer.toString(restManager.getNTotalSeats()));
+        jPanel1.add(jTextFieldNewNTotalSeats);
+
+        jButtonSetNTotalSeats.setFont(new java.awt.Font("Dialog", 1, 14));
+        jButtonSetNTotalSeats.setText("Set");
+        jButtonSetNTotalSeats.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonSetNTotalSeatsActionPerformed(evt);
+            }
+        });
+
+        jPanel1.add(jButtonSetNTotalSeats);
+
+        getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
+
+        jPanelLeft.setLayout(new javax.swing.BoxLayout(jPanelLeft, javax.swing.BoxLayout.Y_AXIS));
+
+        jLabel10.setText("Mode:");
+        jPanelLeft.add(jLabel10);
+
+        jLabelDisplayMode.setText("Automatic");
+        jLabelDisplayMode.setForeground(java.awt.Color.blue);
+        jLabelDisplayMode.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanelLeft.add(jLabelDisplayMode);
+
+        jButtonChangeMode.setText("Change mode");
+        jButtonChangeMode.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonChangeModeActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonChangeMode);
+
+        jLabelResponse.setText("Response:");
+        jPanelLeft.add(jLabelResponse);
+
+        jButtonConfirm.setText("Confirm");
+        jButtonConfirm.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonConfirmActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonConfirm);
+
+        jButtonCancel.setText("Cancel");
+        jButtonCancel.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonCancelActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonCancel);
+
+        getContentPane().add(jPanelLeft, java.awt.BorderLayout.WEST);
+
+        jScrollPane1.setAutoscrolls(true);
+        jTextArea.setEditable(false);
+        jTextArea.setRows(10);
+        jTextArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
+        jScrollPane1.setViewportView(jTextArea);
+
+        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+        pack();
+    }//GEN-END:initComponents
+
+    /**
+     * Reset event handler.
+     */
+    private void jButtonResetFieldsActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonResetFieldsActionPerformed
+        restManager.setToDefault();
+        updateFields();
+    }//GEN-LAST:event_jButtonResetFieldsActionPerformed
+
+    /**
+     * Cancel event handler.
+     */
+    private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonCancelActionPerformed
+        if (restManager.getIsPreparationWaiting())
+        {
+            Object preparation = restManager.getPreparation();
+            try
+            {
+                restManager.setCommit(false);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("RestaurantView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonCancelActionPerformed
+
+    /**
+     * Confirm event handler.
+     */
+    private void jButtonConfirmActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonConfirmActionPerformed
+        if (restManager.getIsPreparationWaiting())
+        {
+            Object preparation = restManager.getPreparation();
+            try
+            {
+                restManager.setCommit(true);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("RestaurantView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonConfirmActionPerformed
+
+    /**
+     * ChangeMode event handler.
+     */
+    private void jButtonChangeModeActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonChangeModeActionPerformed
+        if (restManager.isAutoCommitMode())
+        {
+            restManager.setAutoCommitMode(false);
+        }
+        else
+        {
+            restManager.setAutoCommitMode(true);
+        }
+        updateFields();
+    }//GEN-LAST:event_jButtonChangeModeActionPerformed
+
+    /**
+     * Capacity change event handler.
+     */
+    private void jButtonSetNTotalSeatsActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonSetNTotalSeatsActionPerformed
+        String strNSeats = jTextFieldNewNTotalSeats.getText();
+
+        restManager.newCapacity(Integer.parseInt(strNSeats));
+        int nFreeSeats = restManager.getNFreeSeats();
+
+        jLabelNTotalSeats.setText(strNSeats);
+        jLabelNFreeSeats.setText(Integer.toString(nFreeSeats));
+    }//GEN-LAST:event_jButtonSetNTotalSeatsActionPerformed
+
+    /**
+     * Exit the application.
+     */
+    private void exitForm(java.awt.event.WindowEvent evt)
+    {//GEN-FIRST:event_exitForm
+        //System.exit(0); // disabled for embedding in application servers.
+    }//GEN-LAST:event_exitForm
+
+    /**
+     * Add regular text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(backButtonColor);
+        jButtonCancel.setBackground(backButtonColor);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+    /**
+     * Add status (highlighted) text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addPrepareMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(java.awt.Color.red);
+        jButtonCancel.setBackground(java.awt.Color.red);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+
+    /**
+     * Synchronise the GUI with the underlying state.
+     */
+    public void updateFields()
+    {
+        jLabelNTotalSeats.setText(Integer.toString(restManager.getNTotalSeats()));
+        jTextFieldNewNTotalSeats.setText(Integer.toString(restManager.getNTotalSeats()));
+        jLabelNPreparedSeats.setText(Integer.toString(restManager.getNPreparedSeats()));
+        jLabelNConfirmedSeats.setText(Integer.toString(restManager.getNCommittedSeats()));
+        jLabelNFreeSeats.setText(Integer.toString(restManager.getNFreeSeats()));
+        jLabelNBookedSeats.setText(Integer.toString(restManager.getNBookedSeats()));
+
+        //update fields related to interactive mode.
+        if (restManager.isAutoCommitMode())
+        {
+            jLabelResponse.setVisible(false);
+            jButtonConfirm.setVisible(false);
+            jButtonCancel.setVisible(false);
+            jLabelDisplayMode.setText("automatic");
+        }
+        else
+        {
+            jLabelResponse.setVisible(true);
+            jButtonConfirm.setVisible(true);
+            jButtonCancel.setVisible(true);
+            jLabelDisplayMode.setText("interactive");
+        }
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     */
+    public static RestaurantView getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new RestaurantView(RestaurantManager.getSingletonInstance());
+        }
+
+        singletonInstance.show();
+        return singletonInstance;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static RestaurantView singletonInstance;
+
+
+    // Variables declaration - automatically generated - do not modify
+
+    private javax.swing.JPanel jPanel2;
+    private javax.swing.JLabel jLabel5;
+    private javax.swing.JLabel jLabelNBookedSeats;
+    private javax.swing.JLabel jLabel9;
+    private javax.swing.JLabel jLabelNPreparedSeats;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JLabel jLabelNConfirmedSeats;
+    private javax.swing.JLabel jLabel6;
+    private javax.swing.JLabel jLabelNFreeSeats;
+    private javax.swing.JLabel jLabel7;
+    private javax.swing.JButton jButtonResetFields;
+    private javax.swing.JPanel jPanel1;
+    private javax.swing.JLabel jLabel8;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabelNTotalSeats;
+    private javax.swing.JLabel jLabel4;
+    private javax.swing.JLabel jLabel3;
+    private javax.swing.JTextField jTextFieldNewNTotalSeats;
+    private javax.swing.JButton jButtonSetNTotalSeats;
+    private javax.swing.JPanel jPanelLeft;
+    private javax.swing.JLabel jLabel10;
+    private javax.swing.JLabel jLabelDisplayMode;
+    private javax.swing.JButton jButtonChangeMode;
+    private javax.swing.JLabel jLabelResponse;
+    private javax.swing.JButton jButtonConfirm;
+    private javax.swing.JButton jButtonCancel;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTextArea jTextArea;
+
+    // End of automatically generated variables declarations
+
+    /**
+     * The  {@link RestaurantManager} instance this view is bound to.
+     */
+    private RestaurantManager restManager;
+
+    /**
+     * The current color of the back button.
+     */
+    private java.awt.Color backButtonColor;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,26 @@
+/*
+ * 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.xts.nightout.services.Taxi;
+
+public interface ITaxiService
+{
+    public void bookTaxi();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,26 @@
+/*
+ * 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.xts.nightout.services.Taxi;
+
+public interface ITaxiServiceBA
+{
+    public boolean bookTaxi();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,347 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiManager.java,v 1.3 2004/04/21 13:09:19 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+import java.util.Hashtable;
+
+/**
+ * The transactional application logic for the Taxi Service
+ * <p/>
+ * Stores and manages taxi reservations. Knows nothing about Web Services.
+ * Understands transactional booking lifecycle: unprepared, prepared, finished.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TaxiManager
+{
+    /**
+     * Create and initialise a new TaxiManager instance.
+     */
+    public TaxiManager()
+    {
+        setToDefault();
+    }
+
+    /**
+     * Book a taxi.
+     *
+     * @param txID The transaction identifier
+     */
+    public void bookTaxi(Object txID)
+    {
+        // locate any pre-existing request for the same transaction
+        Integer request = (Integer) unpreparedTransactions.get(txID);
+        if (request == null)
+        {
+            // this is the first request for this
+            // transaction - setup a record for it
+            request = new Integer(0);
+        }
+
+        // record the request, keyed to its transaction scope
+        unpreparedTransactions.put(txID, new Integer(request.intValue()));
+    }
+
+    /**
+     * Attempt to ensure availability of the requested taxi.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean prepareTaxi(Object txID)
+    {
+        // ensure that we have seen this transaction before
+        Integer request = (Integer) unpreparedTransactions.get(txID);
+        if (request == null)
+        {
+            return false; // error: transaction not registered
+        }
+        else
+        {
+            if (autoCommitMode)
+            {
+                // record the prepared transaction
+                preparedTransactions.put(txID, request);
+                unpreparedTransactions.remove(txID);
+                return true;
+            }
+            else
+            {
+                try
+                {
+                    // wait for a user commit/rollback decision
+                    isPreparationWaiting = true;
+                    synchronized (preparation)
+                    {
+                        preparation.wait();
+                    }
+                    isPreparationWaiting = false;
+                    if (isCommit)
+                    {
+                        // record the prepared transaction
+                        preparedTransactions.put(txID, request);
+                        unpreparedTransactions.remove(txID);
+                        return true;
+                    }
+                    else
+                    {
+                        return false;
+
+                    }
+                }
+                catch (Exception e)
+                {
+                    System.err.println("TaxiManager.prepareTaxi(): Unable to stop preparation.");
+                    return false;
+                }
+            }
+        }
+    }
+
+    /**
+     * Release a booked or prepared taxi.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean cancelTaxi(Object txID)
+    {
+        boolean success = false;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+            // undo the prepare operations
+            preparedTransactions.remove(txID);
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // undo the booking operations
+            unpreparedTransactions.remove(txID);
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Commit taxi booking.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean commitTaxi(Object txID)
+    {
+        boolean success = false;
+        hasCommitted = true;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+            // complete the prepared transaction
+            preparedTransactions.remove(txID);
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // use one phase commit optimisation, skipping prepare
+            unpreparedTransactions.remove(txID);
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Determine if a specific transaction is known to the business logic.
+     *
+     * @param txID The uniq id for the transaction
+     * @return true if the business logic is holding state related to the given txID,
+     *         false otherwise.
+     */
+    public boolean knowsAbout(Object txID)
+    {
+        return (unpreparedTransactions.containsKey(txID) || preparedTransactions.containsKey(txID));
+    }
+
+    /**
+     * Determine the autoCommit status of the instance.
+     *
+     * @return true if autoCommit mode is active, false otherwise
+     */
+    public boolean isAutoCommitMode()
+    {
+        return autoCommitMode;
+    }
+
+    /**
+     * Set the autoCommit mode of the instance.
+     *
+     * @param autoCommit true for automatic commit, false for manual commit.
+     */
+    public void setAutoCommitMode(boolean autoCommit)
+    {
+        autoCommitMode = autoCommit;
+    }
+
+    /**
+     * Get the preparation object for manual commit wait/notify.
+     *
+     * @return The preparation object
+     */
+    public Object getPreparation()
+    {
+        return preparation;
+    }
+
+    /**
+     * Determine if the instance is waiting for manual commit/rollback.
+     *
+     * @return true if waiting, false otherwise
+     */
+    public boolean getIsPreparationWaiting()
+    {
+        return isPreparationWaiting;
+    }
+
+    /**
+     * Set the waiting status of the instance.
+     *
+     * @param isWaiting The new value to set
+     */
+    public void setIsPreparationWaiting(boolean isWaiting)
+    {
+        isPreparationWaiting = isWaiting;
+    }
+
+    /**
+     * Set the manual commit status.
+     */
+    public void setCommit(boolean commit)
+    {
+        isCommit = commit;
+    }
+
+    /**
+     * (re-)initialise the instance data structures.
+     */
+    public void setToDefault()
+    {
+        preparedTransactions = new Hashtable();
+        unpreparedTransactions = new Hashtable();
+        autoCommitMode = true;
+        preparation = new Object();
+        isPreparationWaiting = false;
+        isCommit = false;
+        hasCommitted = false;
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     */
+    public static TaxiManager getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new TaxiManager();
+        }
+
+        return singletonInstance;
+    }
+
+    public boolean hasBeenCommitted()
+    {
+        return hasCommitted;
+    }
+
+    public Hashtable getPreparedTransactions()
+    {
+        return preparedTransactions;
+    }
+
+    public Hashtable getUnpreparedTransactions()
+    {
+        return unpreparedTransactions;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static TaxiManager singletonInstance;
+
+    /**
+     * The transactions we know about but which have not been prepared.
+     */
+    private Hashtable unpreparedTransactions;
+
+    /**
+     * The transactions we know about and are prepared to commit.
+     */
+    private Hashtable preparedTransactions;
+
+    /**
+     * The auto commit mode.
+     * <p/>
+     * true = automatically commit, false = manually commit
+     */
+    private boolean autoCommitMode;
+
+    /**
+     * The user specified outcome when in manual commit mode.
+     */
+    private boolean isCommit;
+
+    /**
+     * If the participant has already been commmitted or not.
+     */
+    private boolean hasCommitted = false;
+
+    /**
+     * The object used for wait/notify in manual commit mode.
+     */
+    private Object preparation;
+
+    /**
+     * The waiting status, when in manual commit mode.
+     */
+    private boolean isPreparationWaiting;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,200 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiParticipantAT.java,v 1.3 2005/02/23 09:58:02 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+import com.arjuna.wst.*;
+
+/**
+ * An adapter class that exposes the TaxiManager transaction lifecycle
+ * API as a WS-T Atomic Transaction participant.
+ * Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TaxiParticipantAT implements Durable2PCParticipant
+{
+    /**
+     * Participant instances are related to transaction instances
+     * in a one to one manner.
+     *
+     * @param txID uniq id String for the transaction instance.
+     */
+    public TaxiParticipantAT(String txID)
+    {
+        // Binds to the singleton TaxiView and TaxiManager
+        taxiManager = TaxiManager.getSingletonInstance();
+        taxiView = TaxiView.getSingletonInstance();
+        // we need to save the txID for later use when calling
+        // business logic methods in the taxiManger.
+        this.txID = txID;
+    }
+
+    /**
+     * Invokes the prepare step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @return Prepared where possible, Aborted where necessary.
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public Vote prepare() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the prepare operation
+        // on the backend business logic.
+
+        System.out.println("TaxiParticipantAT.prepare");
+
+        taxiView.addPrepareMessage("id:" + txID + ". Prepare called on participant: " + this.getClass().toString());
+
+        boolean success = taxiManager.prepareTaxi(txID);
+
+        // Log the outcome and map the return value from
+        // the business logic to the appropriate Vote type.
+
+        if (success)
+        {
+            taxiView.addMessage("Taxi prepared successfully. Returning 'Prepared'\n");
+            taxiView.updateFields();
+            return new Prepared();
+        }
+        else
+        {
+            taxiManager.cancelTaxi(txID) ;
+            taxiView.addMessage("Prepare failed (not enough Taxis?) Returning 'Aborted'\n");
+            taxiView.updateFields();
+            return new Aborted();
+        }
+    }
+
+    /**
+     * Invokes the commit step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commit() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the commit operation
+        // on the backend business logic.
+
+        System.out.println("TaxiParticipantAT.commit");
+
+        taxiView.addMessage("id:" + txID + ". Commit called on participant: " + this.getClass().toString());
+
+        boolean success = taxiManager.commitTaxi(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            taxiView.addMessage("Taxi committed\n");
+        }
+        else
+        {
+            taxiView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        taxiView.updateFields();
+    }
+
+    /**
+     * Invokes the rollback operation on the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void rollback() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the rollback operation
+        // on the backend business logic.
+
+        System.out.println("TaxiParticipantAT.rollback");
+
+        taxiView.addMessage("id:" + txID + ". Rollback called on participant: " + this.getClass().toString());
+
+        boolean success = taxiManager.cancelTaxi(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            taxiView.addMessage("Taxi booking cancelled\n");
+        }
+        else
+        {
+            taxiView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        taxiView.updateFields();
+    }
+
+    /**
+     * Shortcut method which combines the prepare
+     * and commit steps in a single operation.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commitOnePhase() throws WrongStateException, SystemException
+    {
+        prepare();
+        commit();
+    }
+
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is passed to the backend business logic methods.
+     */
+    protected String txID;
+
+    /**
+     * The TaxiView object to log events through.
+     */
+    protected static TaxiView taxiView;
+
+    /**
+     * The TaxiManager to perform business logic operations on.
+     */
+    protected static TaxiManager taxiManager;
+}


Property changes on: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiParticipantBA.java,v 1.2 2004/09/09 15:18:11 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+import com.arjuna.wst.*;
+
+/**
+ * An adapter class that exposes the TaxiManager transaction lifecycle
+ * API as a WS-T Business Activity participant.
+ * Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.2 $
+ */
+public class TaxiParticipantBA implements BusinessAgreementWithParticipantCompletionParticipant
+{
+    /**
+     * Participant instances are related to business method calls
+     * in a one to one manner.
+     *
+     * @param txID uniq id String for the transaction instance.
+     */
+    public TaxiParticipantBA(String txID)
+    {
+        // Binds to the singleton TaxiView and TaxiManager
+        taxiManager = TaxiManager.getSingletonInstance();
+        taxiView = TaxiView.getSingletonInstance();
+        // we need to save the txID for later use when logging.
+        this.txID = txID;
+    }
+
+    /**
+     * The transaction has completed successfully. The participant previously
+     * informed the coordinator that it was ready to complete.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void close() throws WrongStateException, SystemException
+    {
+        // for logging only. This impl does not do anything else here.
+
+        System.out.println("TaxiParticipantBA.close");
+
+        taxiView.addMessage("id:" + txID + ". Close called on participant: " + this.getClass());
+        taxiView.updateFields();
+    }
+
+    /**
+     * The transaction has cancelled, and the participant should undo any work.
+     * The participant cannot have informed the coordinator that it has
+     * completed.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void cancel() throws WrongStateException, SystemException
+    {
+        // we will always have called completed or error, so this can be a null op.
+
+        System.out.println("TaxiParticipantBA.cancel");
+
+        taxiView.addMessage("id:" + txID + ". Cancel called on participant: " + this.getClass().toString());
+        taxiView.updateFields();
+    }
+
+    /**
+     * The transaction has cancelled. The participant previously
+     * informed the coordinator that it had finished work but could compensate
+     * later if required, so it is now requested to do so.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException always, because this implementation does not support compensation.
+     */
+
+    public void compensate() throws WrongStateException, SystemException
+    {
+        System.out.println("TaxiParticipantBA.compensate");
+
+        // This impl does not support compensation, in order
+        // to allow illustration of heuristic outcomes.
+        // It just log the event and throws an exception.
+
+        taxiView.addMessage("id:" + txID + ". Compensate called on participant: " + this.getClass().toString());
+
+        taxiView.addMessage("Compensation not supported by ths implementation!");
+        taxiView.updateFields();
+
+        throw new SystemException("Compensation not supported!");
+    }
+
+    public String status () throws SystemException
+    {
+        return Status.STATUS_ACTIVE;
+    }
+
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is used in informational log messages.
+     */
+    protected String txID;
+
+    /**
+     * The TaxiView object to log events through.
+     */
+    protected static TaxiView taxiView;
+
+    /**
+     * The TaxiManager to perform business logic operations on.
+     */
+    protected static TaxiManager taxiManager;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiServiceAT.java,v 1.3 2004/12/01 16:27:01 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+import com.arjuna.mw.wst.UserTransactionFactory;
+import com.arjuna.mw.wst.TransactionManagerFactory;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * An adapter class that exposes the TaxiManager business API as a
+ * transactional Web Service. Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TaxiServiceAT implements ITaxiService
+{
+    /**
+     * Book a taxi
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     */
+    public void bookTaxi()
+    {
+        TaxiView taxiView = TaxiView.getSingletonInstance();
+        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("TaxiServiceAT transaction id =" + transactionId);
+
+            if (!taxiManager.knowsAbout(transactionId))
+            {
+                System.out.println("TaxiServiceAT - enrolling...");
+                // enlist the Participant for this service:
+                TaxiParticipantAT taxiParticipant = new TaxiParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookTaxi: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        taxiView.addMessage("******************************");
+
+        taxiView.addMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
+
+        TaxiManager.getSingletonInstance().bookTaxi(transactionId);
+
+        taxiView.addMessage("Request complete\n");
+        taxiView.updateFields();
+    }
+}
+
+
+
+

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,138 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiServiceBA.java,v 1.5 2004/12/01 16:27:01 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+import com.arjuna.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst.BusinessActivityManager;
+import com.arjuna.mw.wst.BusinessActivityManagerFactory;
+
+/**
+ * An adapter class that exposes the TaxiManager business API as a
+ * transactional Web Service. Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+public class TaxiServiceBA implements ITaxiServiceBA
+{
+    /**
+     * Book a taxi
+     * Enrols a Participant if necessary and passes
+     * the call through to the business logic.
+     *
+     * @return true on success, false otherwise.
+     */
+    public boolean bookTaxi()
+    {
+        TaxiView taxiView = TaxiView.getSingletonInstance();
+        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookTaxi: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        // log the event:
+        System.out.println("TaxiServiceBA transaction id =" + transactionId);
+
+        taxiView.addMessage("******************************");
+
+        taxiView.addPrepareMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
+        taxiView.updateFields();
+
+        // invoke the backend business logic:
+        taxiManager.bookTaxi(transactionId);
+
+        // attempt to finalise the booking
+        if (taxiManager.prepareTaxi(transactionId))
+        {
+            taxiView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            taxiView.updateFields();
+
+            // it worked, so now we need a participant enlisted in case of compensation:
+            TaxiParticipantBA taxiParticipant = new TaxiParticipantBA(transactionId);
+            // enlist the Participant for this service:
+            BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(taxiParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                taxiView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookTaxi: Participant enrolment failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            // finish the booking in the backend:
+            taxiManager.commitTaxi(transactionId);
+
+            try
+            {
+                // tell the manager we have finished our work:
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookTaxi: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            taxiView.addMessage("id:" + transactionId + ". Failed to reserve taxi. Cancelling.");
+            taxiManager.cancelTaxi(transactionId);
+            taxiView.updateFields();
+            return false;
+        }
+
+        taxiView.addMessage("Request complete\n");
+        taxiView.updateFields();
+
+        return true;
+    }
+}
+
+
+
+

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,320 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiView.java,v 1.2 2004/04/21 13:09:20 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Taxi;
+
+/**
+ * The visual interface (GUI) for the Taxi Service.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.2 $
+ */
+public class TaxiView extends javax.swing.JFrame
+{
+    // Note: Some parts of this file were auto-generated
+    // by NetBeans 3.3 FormEditor (http://www.netbeans.org)
+
+    /**
+     * Create a new TaxiView instance.
+     *
+     * @param tManager The {@link TaxiManager} instance to bind to
+     */
+    public TaxiView(TaxiManager tManager)
+    {
+        taxiManager = tManager;
+        initComponents();
+        updateFields();
+        backButtonColor = jButtonConfirm.getBackground();
+    }
+
+    /**
+     * Initialize the form.
+     * This is called by the constructor
+     *
+     * WARNING: Automatically generated code, may be overwritten
+     */
+    private void initComponents()
+    {//GEN-BEGIN:initComponents
+        jPanel2 = new javax.swing.JPanel();
+        jLabel10 = new javax.swing.JLabel();
+        jButtonChangeDefaultAnswer = new javax.swing.JButton();
+        jLabelDefaultAnswer = new javax.swing.JLabel();
+        jPanel3 = new javax.swing.JPanel();
+        jLabel15 = new javax.swing.JLabel();
+        jLabelDisplayMode = new javax.swing.JLabel();
+        jButtonChangeMode = new javax.swing.JButton();
+        jLabelResponse = new javax.swing.JLabel();
+        jButtonConfirm = new javax.swing.JButton();
+        jButtonCancel = new javax.swing.JButton();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTextArea = new javax.swing.JTextArea();
+
+        setTitle("Taxi Service");
+        addWindowListener(new java.awt.event.WindowAdapter()
+        {
+            public void windowClosing(java.awt.event.WindowEvent evt)
+            {
+                exitForm(evt);
+            }
+        });
+
+        jPanel2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+        jLabel10.setText("Taxi                                                                    ");
+        jLabel10.setForeground(java.awt.Color.red);
+        jLabel10.setFont(new java.awt.Font("Dialog", 1, 24));
+        jPanel2.add(jLabel10);
+
+        getContentPane().add(jPanel2, java.awt.BorderLayout.NORTH);
+
+        jPanel3.setLayout(new javax.swing.BoxLayout(jPanel3, javax.swing.BoxLayout.Y_AXIS));
+
+        jLabel15.setText("Mode:");
+        jPanel3.add(jLabel15);
+
+        jLabelDisplayMode.setText("Automatic");
+        jLabelDisplayMode.setForeground(java.awt.Color.blue);
+        jLabelDisplayMode.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanel3.add(jLabelDisplayMode);
+
+        jButtonChangeMode.setText("Change mode");
+        jButtonChangeMode.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonChangeModeActionPerformed(evt);
+            }
+        });
+
+        jPanel3.add(jButtonChangeMode);
+
+        jLabelResponse.setText("Response:");
+        jPanel3.add(jLabelResponse);
+
+        jButtonConfirm.setText("Confirm");
+        jButtonConfirm.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonConfirmActionPerformed(evt);
+            }
+        });
+
+        jPanel3.add(jButtonConfirm);
+
+        jButtonCancel.setText("Cancel");
+        jButtonCancel.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonCancelActionPerformed(evt);
+            }
+        });
+
+        jPanel3.add(jButtonCancel);
+
+        getContentPane().add(jPanel3, java.awt.BorderLayout.WEST);
+
+        jScrollPane1.setAutoscrolls(true);
+        jTextArea.setEditable(false);
+        jTextArea.setRows(10);
+        jTextArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
+        jScrollPane1.setViewportView(jTextArea);
+
+        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+        pack();
+    }//GEN-END:initComponents
+
+    /**
+     * Cancel event handler.
+     */
+    private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonCancelActionPerformed
+        if (taxiManager.getIsPreparationWaiting())
+        {
+            Object preparation = taxiManager.getPreparation();
+            try
+            {
+                taxiManager.setCommit(false);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("TaxiView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonCancelActionPerformed
+
+    /**
+     * Confirm event handler.
+     */
+    private void jButtonConfirmActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonConfirmActionPerformed
+        if (taxiManager.getIsPreparationWaiting())
+        {
+            Object preparation = taxiManager.getPreparation();
+            try
+            {
+                taxiManager.setCommit(true);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("TaxiView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonConfirmActionPerformed
+
+    /**
+     * ChangeMode event handler.
+     */
+    private void jButtonChangeModeActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonChangeModeActionPerformed
+        if (taxiManager.isAutoCommitMode())
+        {
+            taxiManager.setAutoCommitMode(false);
+        }
+        else
+        {
+            taxiManager.setAutoCommitMode(true);
+        }
+        updateFields();
+    }//GEN-LAST:event_jButtonChangeModeActionPerformed
+
+    /**
+     * Exit the application.
+     */
+    private void exitForm(java.awt.event.WindowEvent evt)
+    {//GEN-FIRST:event_exitForm
+        //System.exit(0); // disabled for embedding in application servers.
+    }//GEN-LAST:event_exitForm
+
+    /**
+     * Add status (highlighted) text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(backButtonColor);
+        jButtonCancel.setBackground(backButtonColor);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+    /**
+     * Add status (highlighted) text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addPrepareMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(java.awt.Color.red);
+        jButtonCancel.setBackground(java.awt.Color.red);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+    /**
+     * Synchronise the GUI with the underlying state.
+     */
+    public void updateFields()
+    {
+        //update fields related to interactive mode.
+        if (taxiManager.isAutoCommitMode())
+        {
+            jLabelResponse.setVisible(false);
+            jButtonConfirm.setVisible(false);
+            jButtonCancel.setVisible(false);
+            jLabelDisplayMode.setText("automatic");
+        }
+        else
+        {
+            jLabelResponse.setVisible(true);
+            jButtonConfirm.setVisible(true);
+            jButtonCancel.setVisible(true);
+            jLabelDisplayMode.setText("interactive");
+        }
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     */
+    public static TaxiView getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new TaxiView(TaxiManager.getSingletonInstance());
+        }
+        singletonInstance.show();
+        return singletonInstance;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static TaxiView singletonInstance;
+
+    // Variables declaration - automatically generated - do not modify
+    private javax.swing.JPanel jPanel2;
+    private javax.swing.JLabel jLabel10;
+    private javax.swing.JButton jButtonChangeDefaultAnswer;
+    private javax.swing.JLabel jLabelDefaultAnswer;
+    private javax.swing.JPanel jPanel3;
+    private javax.swing.JLabel jLabel15;
+    private javax.swing.JLabel jLabelDisplayMode;
+    private javax.swing.JButton jButtonChangeMode;
+    private javax.swing.JLabel jLabelResponse;
+    private javax.swing.JButton jButtonConfirm;
+    private javax.swing.JButton jButtonCancel;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTextArea jTextArea;
+
+    // End of automatically generated variables declarations
+    /**
+     * The  {@link TaxiManager} instance this view is bound to.
+     */
+    private TaxiManager taxiManager;
+    /**
+     * The current color of the back button.
+     */
+    private java.awt.Color backButtonColor;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,27 @@
+/*
+ * 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.xts.nightout.services.Theatre;
+
+public interface ITheatreService
+{
+
+    public void bookSeats(int how_many, int which_area);
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,27 @@
+/*
+ * 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.xts.nightout.services.Theatre;
+
+public interface ITheatreServiceBA
+{
+
+    public boolean bookSeats(int how_many, int which_area);
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,529 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreManager.java,v 1.4 2004/04/21 13:09:20 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+import java.util.Hashtable;
+
+/**
+ * The transactional application logic for the Theatre Service.
+ * <p/>
+ * Stores and manages seating reservations. Knows nothing about Web Services.
+ * Understands transactional booking lifecycle: unprepared, prepared, finished.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.4 $
+ */
+public class TheatreManager
+{
+    /**
+     * Create and initialise a new TheatreManager instance.
+     */
+    public TheatreManager()
+    {
+        setToDefault();
+    }
+
+    /**
+     * Book a number of seats in a specific area of the theatre.
+     *
+     * @param txID   The transaction identifier
+     * @param nSeats The number of seats requested
+     * @param area   The type of seating requested
+     */
+    public void bookSeats(Object txID, int nSeats, int area)
+    {
+        // locate any pre-existing request for the same transaction
+        Integer[] requests = (Integer[]) unpreparedTransactions.get(txID);
+        if (requests == null)
+        {
+            // this is the first request for this transaction
+            // setup the data structure to record it
+            requests = new Integer[NUM_SEAT_AREAS];
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                requests[i] = new Integer(0);
+            }
+        }
+
+        // record the request, keyed to its transaction scope
+        requests[area] = new Integer(requests[area].intValue() + nSeats);
+        unpreparedTransactions.put(txID, requests);
+
+        // record the increased commitment to provide seating
+        nBookedSeats[area] += nSeats;
+    }
+
+    /**
+     * Attempt to ensure availability of the requested seating.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean prepareSeats(Object txID)
+    {
+        int[] nSeats = new int[NUM_SEAT_AREAS];
+
+        // ensure that we have seen this transaction before
+        Integer[] requests = (Integer[]) unpreparedTransactions.get(txID);
+        if (requests == null)
+        {
+            return false; // error: transaction not registered
+        }
+        else
+        {
+            // determine the number of seats available
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                nSeats[i] = nFreeSeats[i];
+                nSeats[i] -= requests[i].intValue();
+            }
+            if (autoCommitMode)
+            {
+                boolean success = true;
+                // check we have enough seats avaiable
+                for (int i = 0; i < NUM_SEAT_AREAS; i++)
+                {
+                    if (nSeats[i] < 0)
+                    {
+                        success = false; // error: not enough seats
+                    }
+                }
+                if (success)
+                {
+                    // record the prepared transaction
+                    preparedTransactions.put(txID, requests);
+                    unpreparedTransactions.remove(txID);
+                    // mark the prepared seats as unavailable
+                    for (int i = 0; i < NUM_SEAT_AREAS; i++)
+                    {
+                        nFreeSeats[i] = nSeats[i];
+                        nPreparedSeats[i] += requests[i].intValue();
+                    }
+                }
+                return success;
+            }
+            else
+            {
+                try
+                {
+                    // wait for a user commit/rollback decision
+                    isPreparationWaiting = true;
+                    synchronized (preparation)
+                    {
+                        preparation.wait();
+                    }
+                    isPreparationWaiting = false;
+
+                    // process the user decision
+                    if (isCommit)
+                    {
+                        // record the prepared transaction
+                        preparedTransactions.put(txID, requests);
+                        unpreparedTransactions.remove(txID);
+                        // mark the prepared seats as unavailable
+                        for (int i = 0; i < NUM_SEAT_AREAS; i++)
+                        {
+                            nFreeSeats[i] = nSeats[i];
+                            nPreparedSeats[i] += requests[i].intValue();
+                        }
+                        return true;
+                    }
+                    else
+                    {
+                        return false;
+                    }
+                }
+                catch (Exception e)
+                {
+                    System.err.println("TheatreManager.prepareSeats(): Unable to stop preparation.");
+                    return false;
+                }
+            }
+        }
+    }
+
+    /**
+     * Release booked or prepared seats.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean cancelSeats(Object txID)
+    {
+        boolean success = false;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+            // undo the prepare operations
+            Integer[] requests = (Integer[]) preparedTransactions.remove(txID);
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                nFreeSeats[i] += requests[i].intValue();
+                nPreparedSeats[i] -= requests[i].intValue();
+                nBookedSeats[i] -= requests[i].intValue();
+            }
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // undo the booking operations
+            Integer[] requests = (Integer[]) unpreparedTransactions.remove(txID);
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                nBookedSeats[i] -= requests[i].intValue();
+            }
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Commit seat bookings.
+     *
+     * @param txID The transaction identifier
+     * @return true on success, false otherwise
+     */
+    public boolean commitSeats(Object txID)
+    {
+        boolean success = false;
+
+        // the transaction may be prepared, unprepared or unknown
+
+        if (preparedTransactions.containsKey(txID))
+        {
+
+            // complete the prepared transaction
+            Integer[] requests = (Integer[]) preparedTransactions.remove(txID);
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                nCommittedSeats[i] += requests[i].intValue();
+                nPreparedSeats[i] -= requests[i].intValue();
+                nBookedSeats[i] -= requests[i].intValue();
+            }
+            success = true;
+        }
+        else if (unpreparedTransactions.containsKey(txID))
+        {
+            // use one phase commit optimisation, skipping prepare
+            Integer[] requests = (Integer[]) unpreparedTransactions.remove(txID);
+            for (int i = 0; i < NUM_SEAT_AREAS; i++)
+            {
+                nCommittedSeats[i] += requests[i].intValue();
+                nFreeSeats[i] -= requests[i].intValue();
+                nBookedSeats[i] -= requests[i].intValue();
+            }
+            success = true;
+        }
+        else
+        {
+            success = false; // error: transaction not registered
+        }
+
+        return success;
+    }
+
+    /**
+     * Determine if a specific transaction is known to the business logic.
+     *
+     * @param txID The uniq id for the transaction
+     * @return true if the business logic is holding state related to the given txID,
+     *         false otherwise.
+     */
+    public boolean knowsAbout(Object txID)
+    {
+        return (unpreparedTransactions.containsKey(txID) || preparedTransactions.containsKey(txID));
+    }
+
+    /**
+     * Change the capacity of a given seating area.
+     *
+     * @param area   The seating area to change
+     * @param nSeats The new capacity for the area
+     */
+    public void newCapacity(int area, int nSeats)
+    {
+        nFreeSeats[area] += nSeats - nTotalSeats[area];
+        nTotalSeats[area] = nSeats;
+    }
+
+    /**
+     * Get the number of free seats in the given area.
+     *
+     * @param area The area of interest
+     * @return The number of free seats
+     */
+    public int getNFreeSeats(int area)
+    {
+        return nFreeSeats[area];
+    }
+
+    /**
+     * Get the total number of seats in the given area.
+     *
+     * @param area The area of interest
+     * @return The total number of seats
+     */
+    public int getNTotalSeats(int area)
+    {
+        return nTotalSeats[area];
+    }
+
+    /**
+     * Get the number of booked seats in the given area.
+     *
+     * @param area The area of interest
+     * @return The number of booked seats
+     */
+    public int getNBookedSeats(int area)
+    {
+        return nBookedSeats[area];
+    }
+
+    /**
+     * Get the number of prepared seats in the given area.
+     *
+     * @param area The area of interest
+     * @return The number of prepared seats
+     */
+    public int getNPreparedSeats(int area)
+    {
+        return nPreparedSeats[area];
+    }
+
+    /**
+     * Get the number of committed seats in the given area.
+     *
+     * @param area The area of interest
+     * @return The number of committed seats
+     */
+    public int getNCommittedSeats(int area)
+    {
+        return nCommittedSeats[area];
+    }
+
+    /**
+     * Determine the autoCommit status of the instance.
+     *
+     * @return true if autoCommit mode is active, false otherwise
+     */
+    public boolean isAutoCommitMode()
+    {
+        return autoCommitMode;
+    }
+
+    /**
+     * Set the autoCommit mode of the instance.
+     *
+     * @param autoCommit true for automatic commit, false for manual commit.
+     */
+    public void setAutoCommitMode(boolean autoCommit)
+    {
+        autoCommitMode = autoCommit;
+    }
+
+    /**
+     * Get the preparation object for manual commit wait/notify.
+     *
+     * @return The preparation object
+     */
+    public Object getPreparation()
+    {
+        return preparation;
+    }
+
+    /**
+     * Determine if the instance is waiting for manual commit/rollback.
+     *
+     * @return true if waiting, false otherwise
+     */
+    public boolean getIsPreparationWaiting()
+    {
+        return isPreparationWaiting;
+    }
+
+    /**
+     * Set the waiting status of the instance.
+     *
+     * @param isWaiting The new value to set
+     */
+    public void setIsPreparationWaiting(boolean isWaiting)
+    {
+        isPreparationWaiting = isWaiting;
+    }
+
+    /**
+     * Set the manual commit status.
+     */
+    public void setCommit(boolean commit)
+    {
+        isCommit = commit;
+    }
+
+    /**
+     * (re-)initialise the instance data structures.
+     */
+    public void setToDefault()
+    {
+        nTotalSeats = new int[NUM_SEAT_AREAS];
+        nFreeSeats = new int[NUM_SEAT_AREAS];
+        nBookedSeats = new int[NUM_SEAT_AREAS];
+        nPreparedSeats = new int[NUM_SEAT_AREAS];
+        nCommittedSeats = new int[NUM_SEAT_AREAS];
+        for (int i = 0; i < NUM_SEAT_AREAS; i++)
+        {
+            nTotalSeats[i] = DEFAULT_SEATING_CAPACITY;
+            nFreeSeats[i] = nTotalSeats[i];
+            nBookedSeats[i] = 0;
+            nPreparedSeats[i] = 0;
+            nCommittedSeats[i] = 0;
+        }
+        preparedTransactions = new Hashtable();
+        unpreparedTransactions = new Hashtable();
+        autoCommitMode = true;
+        preparation = new Object();
+        isPreparationWaiting = false;
+        isCommit = true;
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     */
+    public static TheatreManager getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new TheatreManager();
+        }
+
+        return singletonInstance;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static TheatreManager singletonInstance;
+
+    /*
+     * The following arrays are indexed by seating type.
+     *
+     * nTotalSeats = ( nFreeSeats + nBookedSeats + nPreparedSeats )
+     */
+
+    /**
+     * The total seating capacity of each area.
+     */
+    private int[] nTotalSeats;
+
+    /**
+     * The number of free seats in each area.
+     */
+    private int[] nFreeSeats;
+
+    /**
+     * The number of booked seats in each area.
+     * <p/>
+     * Note: This may exceed the total size of the area
+     */
+    private int[] nBookedSeats;
+
+    /**
+     * The number of prepared (promised) seats in each area.
+     */
+    private int[] nPreparedSeats;
+
+    /**
+     * The number of committed seats in each area.
+     */
+    private int[] nCommittedSeats;
+
+    /**
+     * The auto commit mode.
+     * <p/>
+     * true = automatically commit, false = manually commit
+     */
+    private boolean autoCommitMode;
+
+    /**
+     * The object used for wait/notify in manual commit mode.
+     */
+    private Object preparation;
+
+    /**
+     * The waiting status, when in manual commit mode.
+     */
+    private boolean isPreparationWaiting;
+
+    /**
+     * The user specified outcome when in manual commit mode.
+     */
+    private boolean isCommit;
+
+    /**
+     * The transactions we know about but which have not been prepared.
+     */
+    private Hashtable unpreparedTransactions;
+
+    /**
+     * The transactions we know about and are prepared to commit.
+     */
+    private Hashtable preparedTransactions;
+
+    /**
+     * Constant (array index) used for the seating area CIRCLE.
+     */
+    public static final int CIRCLE = 0;
+
+    /**
+     * Constant (array index) used for the seating area STALLS.
+     */
+    public static final int STALLS = 1;
+
+    /**
+     * Constant (array index) used for the seating area BALCONY.
+     */
+    public static final int BALCONY = 2;
+
+    /**
+     * The total number (array size) of seating areas.
+     */
+    public static final int NUM_SEAT_AREAS = 3;
+
+    /**
+     * The default initial capacity of each seating area.
+     */
+    public static final int DEFAULT_SEATING_CAPACITY = 100;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreParticipantAT.java,v 1.3 2005/02/23 09:58:02 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+import com.arjuna.wst.*;
+
+/**
+ * An adapter class that exposes the TheatreManager transaction lifecycle
+ * API as a WS-T Atomic Transaction participant.
+ * Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TheatreParticipantAT implements Durable2PCParticipant
+{
+    /**
+     * Participant instances are related to transaction instances
+     * in a one to one manner.
+     *
+     * @param txID uniq id String for the transaction instance.
+     */
+    public TheatreParticipantAT(String txID)
+    {
+        // Binds to the singleton TheatreView and TheatreManager
+        theatreManager = TheatreManager.getSingletonInstance();
+        theatreView = TheatreView.getSingletonInstance();
+        // we need to save the txID for later use when calling
+        // business logic methods in the theatreManger.
+        this.txID = txID;
+    }
+
+    /**
+     * Invokes the prepare step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @return trus on success, false otherwise.
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public Vote prepare() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the prepare operation
+        // on the backend business logic.
+
+        System.out.println("TheatreParticipantAT.prepare");
+
+        theatreView.addPrepareMessage("id:" + txID + ". Prepare called on participant: " + this.getClass().toString());
+
+        boolean success = theatreManager.prepareSeats(txID);
+
+        // Log the outcome and map the return value from
+        // the business logic to the appropriate Vote type.
+
+
+        if (success)
+        {
+            theatreView.addMessage("Theatre prepared successfully. Returning 'Prepared'\n");
+            theatreView.updateFields();
+            return new Prepared();
+        }
+        else
+        {
+            theatreManager.cancelSeats(txID) ;
+            theatreView.addMessage("Prepare failed (not enough seats?) Returning 'Aborted'\n");
+            theatreView.updateFields();
+            return new Aborted();
+        }
+    }
+
+    /**
+     * Invokes the commit step of the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commit() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the commit operation
+        // on the backend business logic.
+
+        System.out.println("TheatreParticipantAT.commit");
+
+        theatreView.addMessage("id:" + txID + ". Commit called on participant: " + this.getClass().toString());
+
+        boolean success = theatreManager.commitSeats(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            theatreView.addMessage("Theatre tickets committed\n");
+        }
+        else
+        {
+            theatreView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        theatreView.updateFields();
+    }
+
+    /**
+     * Invokes the rollback operation on the business logic,
+     * reporting activity and outcome.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void rollback() throws WrongStateException, SystemException
+    {
+        // Log the event and invoke the rollback operation
+        // on the backend business logic.
+
+        System.out.println("TheatreParticipantAT.rollback");
+
+        theatreView.addMessage("id:" + txID + ". Rollback called on participant: " + this.getClass().toString());
+
+        boolean success = theatreManager.cancelSeats(txID);
+
+        // Log the outcome
+
+        if (success)
+        {
+            theatreView.addMessage("Theatre booking cancelled\n");
+        }
+        else
+        {
+            theatreView.addMessage("Something went wrong (Transaction not registered?)\n");
+        }
+
+        theatreView.updateFields();
+    }
+
+    /**
+     * Shortcut method which combines the prepare
+     * and commit steps in a single operation.
+     *
+     * @throws WrongStateException
+     * @throws SystemException
+     */
+    public void commitOnePhase() throws WrongStateException, SystemException
+    {
+        prepare();
+        commit();
+    }
+
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is passed to the backend business logic methods.
+     */
+    protected String txID;
+
+    /**
+     * The TheatreView object to log events through.
+     */
+    protected static TheatreView theatreView;
+
+    /**
+     * The TheatreManager to perform business logic operations on.
+     */
+    protected static TheatreManager theatreManager;
+}


Property changes on: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,194 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreParticipantBA.java,v 1.3 2004/09/09 15:18:10 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+import com.arjuna.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * An adapter class that exposes the TheatreManager transaction lifecycle
+ * API as a WS-T Business Activity participant.
+ * Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TheatreParticipantBA implements BusinessAgreementWithParticipantCompletionParticipant
+{
+    /**
+     * Participant instances are related to business method calls
+     * in a one to one manner.
+     *
+     * @param txID       uniq id String for the transaction instance.
+     * @param how_many   seats to book/compensate.
+     * @param which_area of the theatre the seats are in.
+     */
+    public TheatreParticipantBA(String txID, int how_many, int which_area)
+    {
+        // Binds to the singleton TheatreView and TheatreManager
+        theatreManager = TheatreManager.getSingletonInstance();
+        theatreView = TheatreView.getSingletonInstance();
+        // we need to save the txID for later use when logging
+        this.txID = txID;
+        // we also need the business paramater(s) in case of compensation
+        this.seatCount = how_many;
+        this.seatingArea = which_area;
+    }
+
+    /**
+     * The transaction has completed successfully. The participant previously
+     * informed the coordinator that it was ready to complete.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void close() throws WrongStateException, SystemException
+    {
+        // for logging only. This impl does not do anything else here.
+
+        System.out.println("TheatreParticipantBA.close");
+
+        theatreView.addMessage("id:" + txID + ". Close called on participant: " + this.getClass());
+        theatreView.updateFields();
+    }
+
+    /**
+     * The transaction has cancelled, and the participant should undo any work.
+     * The participant cannot have informed the coordinator that it has
+     * completed.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException never in this implementation.
+     */
+
+    public void cancel() throws WrongStateException, SystemException
+    {
+        // we will always have called completed or error, so this can be a null op.
+
+        System.out.println("TheatreParticipantBA.cancel");
+
+        theatreView.addMessage("id:" + txID + ". Cancel called on participant: " + this.getClass().toString());
+        theatreView.updateFields();
+    }
+
+    /**
+     * The transaction has cancelled. The participant previously
+     * informed the coordinator that it had finished work but could compensate
+     * later if required, so it is now requested to do so.
+     *
+     * @throws WrongStateException never in this implementation.
+     * @throws SystemException if unable to perform the compensating transaction.
+     */
+
+    public void compensate() throws WrongStateException, SystemException
+    {
+        System.out.println("TheatreParticipantBA.compensate");
+
+        // Log the event and perform a compensating transaction
+        // on the backend business logic if needed.
+
+        theatreView.addPrepareMessage("id:" + txID + ". Compensate called on participant: " + this.getClass().toString());
+        theatreView.updateFields();
+
+        if (seatCount > 0)
+        {
+            String compensatingTxID = new Uid().toString();
+            // use a negative number of seats to 'reverse' the previous booking
+            // This technique (hack) prevents us needing new business logic to support compensation.
+            theatreManager.bookSeats(compensatingTxID, seatCount * -1, seatingArea);
+            theatreView.updateFields();
+
+            boolean success = false;
+            if(theatreManager.prepareSeats(compensatingTxID))
+            {
+                if (theatreManager.commitSeats(compensatingTxID))
+                {
+                    theatreView.addMessage("id:" + txID + " Compensating transaction completed sucessfully.");
+                    theatreView.updateFields();
+                    success = true;
+                }
+            }
+            else
+            {
+                theatreManager.cancelSeats(compensatingTxID);
+            }
+
+            if(!success)
+            {
+                theatreView.addMessage("id:" + txID + " Compensation failed. Throwing SystemException\n");
+                theatreView.updateFields();
+                throw new SystemException("Compensating transaction failed.");
+            }
+        }
+    }
+    
+    public String status()
+    {
+        return Status.STATUS_ACTIVE ;
+    }
+
+    public void unknown() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    public void error() throws SystemException
+    {
+        // used for calbacks during crash recovery. This impl is not recoverable
+    }
+
+    /**
+     * Id for the transaction which this participant instance relates to.
+     * Set by the service (via contrtuctor) at enrolment time, this value
+     * is used in informational log messages.
+     */
+    protected String txID;
+
+    /**
+     * Copy of business state information, may be needed during compensation.
+     */
+    protected int seatCount;
+
+    /**
+     * Copy of business state information, may be needed during compensation.
+     */
+    protected int seatingArea;
+
+    /**
+     * The TheatreView object to log events through.
+     */
+    protected static TheatreView theatreView;
+
+    /**
+     * The TheatreManager to perform business logic operations on.
+     */
+    protected static TheatreManager theatreManager;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreServiceAT.java,v 1.3 2004/12/01 16:27:21 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+import com.arjuna.mw.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+
+/**
+ * An adapter class that exposes the TheatreManager business API as a
+ * transactional Web Service. Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TheatreServiceAT implements ITheatreService
+{
+    /**
+     * Book a number of seats in the Theatre
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many   The number of seats to book
+     * @param which_area The area of the theatre to book seats in
+     */
+    public void bookSeats(int how_many, int which_area)
+    {
+        TheatreView theatreView = TheatreView.getSingletonInstance();
+        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("TheatreServiceAT transaction id =" + transactionId);
+
+            if (!theatreManager.knowsAbout(transactionId))
+            {
+                System.out.println("theatreService - enrolling...");
+                // enlist the Participant for this service:
+                TheatreParticipantAT theatreParticipant = new TheatreParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookSeats: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        theatreView.addMessage("******************************");
+
+        theatreView.addMessage("id:" + transactionId.toString() + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
+
+        TheatreManager.getSingletonInstance().bookSeats(transactionId, how_many, which_area);
+
+        theatreView.addMessage("Request complete\n");
+        theatreView.updateFields();
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreServiceBA.java,v 1.5 2004/12/01 16:27:21 kconner Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+import com.arjuna.mw.wst.*;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.wst.*;
+
+/**
+ * An adapter class that exposes the TheatreManager business API as a
+ * transactional Web Service. Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+public class TheatreServiceBA implements ITheatreServiceBA
+{
+    /**
+     * Book a number of seats in the Theatre
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many   The number of seats to book.
+     * @param which_area The area of the theatre to book seats in.
+     * @return true on success, false otherwise.
+     */
+    public boolean bookSeats(int how_many, int which_area)
+    {
+        TheatreView theatreView = TheatreView.getSingletonInstance();
+        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookSeats: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        System.out.println("TheatreServiceBA transaction id =" + transactionId);
+
+        theatreView.addMessage("******************************");
+
+        theatreView.addPrepareMessage("id:" + transactionId + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
+        theatreView.updateFields();
+
+        theatreManager.bookSeats(transactionId, how_many, which_area);
+
+        if (theatreManager.prepareSeats(transactionId))
+        {
+            theatreView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            theatreView.updateFields();
+
+            TheatreParticipantBA theatreParticipant = new TheatreParticipantBA(transactionId, how_many, which_area);
+            // enlist the Participant for this service:
+            com.arjuna.wst.BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(theatreParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                theatreView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookSeats: Participant enrolement failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            theatreManager.commitSeats(transactionId);
+
+            try
+            {
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookSeats: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            theatreView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
+            theatreManager.cancelSeats(transactionId);
+            theatreView.updateFields();
+            return false;
+        }
+
+        theatreView.addMessage("Request complete\n");
+        theatreView.updateFields();
+
+        return true;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,608 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreView.java,v 1.3 2004/04/21 13:09:21 jhalliday Exp $
+ *
+ */
+
+package com.arjuna.xts.nightout.services.Theatre;
+
+/**
+ * The visual interface (GUI) for the Theatre Service.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+public class TheatreView extends javax.swing.JFrame
+{
+
+    // Note: Some parts of this file were auto-generated
+    // by NetBeans 3.3 FormEditor (http://www.netbeans.org)
+
+    /**
+     * Create a new TheatreView instance.
+     *
+     * @param tManager The {@link TheatreManager} instance to bind to
+     */
+    public TheatreView(TheatreManager tManager)
+    {
+        theatreManager = tManager;
+        initComponents();
+        updateFields();
+        backButtonColor = jButtonConfirm.getBackground();
+    }
+
+
+    /**
+     * Initialize the form.
+     * This is called by the constructor
+     * <p/>
+     * WARNING: Automatically generated code, may be overwritten
+     */
+    private void initComponents()
+    {//GEN-BEGIN:initComponents
+        jPanel1 = new javax.swing.JPanel();
+        jLabel1 = new javax.swing.JLabel();
+        jLabel3 = new javax.swing.JLabel();
+        jLabel29 = new javax.swing.JLabel();
+        jLabel30 = new javax.swing.JLabel();
+        jLabel25 = new javax.swing.JLabel();
+        jLabelNBookedSeatsCircle = new javax.swing.JLabel();
+        jLabelNConfirmedSeatsCircle = new javax.swing.JLabel();
+        jLabelNFreeSeatsCircle = new javax.swing.JLabel();
+        jLabel35 = new javax.swing.JLabel();
+        jLabelNBookedSeatsStalls = new javax.swing.JLabel();
+        jLabelNConfirmedSeatsStalls = new javax.swing.JLabel();
+        jLabelNFreeSeatsStalls = new javax.swing.JLabel();
+        jLabel28 = new javax.swing.JLabel();
+        jLabelNBookedSeatsBalcony = new javax.swing.JLabel();
+        jLabelNConfirmedSeatsBalcony = new javax.swing.JLabel();
+        jLabelNFreeSeatsBalcony = new javax.swing.JLabel();
+        jLabel34 = new javax.swing.JLabel();
+        jButtonResetFields = new javax.swing.JButton();
+        jPanel2 = new javax.swing.JPanel();
+        jLabel10 = new javax.swing.JLabel();
+        jLabel13 = new javax.swing.JLabel();
+        jLabel18 = new javax.swing.JLabel();
+        jLabelNTotalSeatsCircle = new javax.swing.JLabel();
+        jLabel19 = new javax.swing.JLabel();
+        jLabelNTotalSeatsStalls = new javax.swing.JLabel();
+        jLabel20 = new javax.swing.JLabel();
+        jLabelNTotalSeatsBalcony = new javax.swing.JLabel();
+        jTextFieldNewNTotalSeats = new javax.swing.JTextField();
+        jButtonSetCircle = new javax.swing.JButton();
+        jButtonSetSalls = new javax.swing.JButton();
+        jButtonSetBalcony = new javax.swing.JButton();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTextArea = new javax.swing.JTextArea();
+        jPanelLeft = new javax.swing.JPanel();
+        jLabel15 = new javax.swing.JLabel();
+        jLabelDisplayMode = new javax.swing.JLabel();
+        jButtonChangeMode = new javax.swing.JButton();
+        jLabelResponse = new javax.swing.JLabel();
+        jButtonConfirm = new javax.swing.JButton();
+        jButtonCancel = new javax.swing.JButton();
+
+        setTitle("Theatre Service");
+        addWindowListener(new java.awt.event.WindowAdapter()
+        {
+            public void windowClosing(java.awt.event.WindowEvent evt)
+            {
+                exitForm(evt);
+            }
+        });
+
+        jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+        jLabel1.setText("SEATS");
+        jLabel1.setForeground(java.awt.Color.darkGray);
+        jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel1);
+
+        jLabel3.setText("(booked, ");
+        jLabel3.setForeground(java.awt.Color.gray);
+        jPanel1.add(jLabel3);
+
+        jLabel29.setText("confirmed, ");
+        jLabel29.setForeground(new java.awt.Color(0, 51, 204));
+        jPanel1.add(jLabel29);
+
+        jLabel30.setText("free)       ");
+        jLabel30.setForeground(new java.awt.Color(0, 153, 0));
+        jPanel1.add(jLabel30);
+
+        jLabel25.setText("Circle (");
+        jLabel25.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel25);
+
+        jLabelNBookedSeatsCircle.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.CIRCLE)));
+        jLabelNBookedSeatsCircle.setForeground(java.awt.Color.gray);
+        jLabelNBookedSeatsCircle.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNBookedSeatsCircle);
+
+        jLabelNConfirmedSeatsCircle.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.CIRCLE)));
+        jLabelNConfirmedSeatsCircle.setForeground(new java.awt.Color(0, 51, 204));
+        jLabelNConfirmedSeatsCircle.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNConfirmedSeatsCircle);
+
+        jLabelNFreeSeatsCircle.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.CIRCLE)));
+        jLabelNFreeSeatsCircle.setForeground(new java.awt.Color(0, 153, 0));
+        jLabelNFreeSeatsCircle.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNFreeSeatsCircle);
+
+        jLabel35.setText("),  Stalls (");
+        jLabel35.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel35);
+
+        jLabelNBookedSeatsStalls.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.STALLS)));
+        jLabelNBookedSeatsStalls.setForeground(java.awt.Color.gray);
+        jLabelNBookedSeatsStalls.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNBookedSeatsStalls);
+
+        jLabelNConfirmedSeatsStalls.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.STALLS)));
+        jLabelNConfirmedSeatsStalls.setForeground(new java.awt.Color(0, 51, 204));
+        jLabelNConfirmedSeatsStalls.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNConfirmedSeatsStalls);
+
+        jLabelNFreeSeatsStalls.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.STALLS)));
+        jLabelNFreeSeatsStalls.setForeground(new java.awt.Color(0, 153, 0));
+        jLabelNFreeSeatsStalls.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNFreeSeatsStalls);
+
+        jLabel28.setText("),  Balcony (");
+        jLabel28.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel28);
+
+        jLabelNBookedSeatsBalcony.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.BALCONY)));
+        jLabelNBookedSeatsBalcony.setForeground(java.awt.Color.gray);
+        jLabelNBookedSeatsBalcony.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNBookedSeatsBalcony);
+
+        jLabelNConfirmedSeatsBalcony.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.BALCONY)));
+        jLabelNConfirmedSeatsBalcony.setForeground(new java.awt.Color(51, 0, 204));
+        jLabelNConfirmedSeatsBalcony.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNConfirmedSeatsBalcony);
+
+        jLabelNFreeSeatsBalcony.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.BALCONY)));
+        jLabelNFreeSeatsBalcony.setForeground(new java.awt.Color(0, 153, 0));
+        jLabelNFreeSeatsBalcony.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel1.add(jLabelNFreeSeatsBalcony);
+
+        jLabel34.setText(")     ");
+        jLabel34.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel1.add(jLabel34);
+
+        jButtonResetFields.setText("Reset Fields");
+        jButtonResetFields.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonResetFieldsActionPerformed(evt);
+            }
+        });
+
+        jPanel1.add(jButtonResetFields);
+
+        getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);
+
+        jPanel2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.black));
+        jLabel10.setText("Theatre      ");
+        jLabel10.setForeground(java.awt.Color.red);
+        jLabel10.setFont(new java.awt.Font("Dialog", 1, 24));
+        jPanel2.add(jLabel10);
+
+        jLabel13.setText("TOTAL SEATS   ");
+        jLabel13.setForeground(java.awt.Color.darkGray);
+        jLabel13.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel2.add(jLabel13);
+
+        jLabel18.setText("Circle:");
+        jLabel18.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel2.add(jLabel18);
+
+        jLabelNTotalSeatsCircle.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.CIRCLE)));
+        jLabelNTotalSeatsCircle.setForeground(java.awt.Color.darkGray);
+        jLabelNTotalSeatsCircle.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel2.add(jLabelNTotalSeatsCircle);
+
+        jLabel19.setText("Stalls:");
+        jLabel19.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel2.add(jLabel19);
+
+        jLabelNTotalSeatsStalls.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.STALLS)));
+        jLabelNTotalSeatsStalls.setForeground(java.awt.Color.darkGray);
+        jLabelNTotalSeatsStalls.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel2.add(jLabelNTotalSeatsStalls);
+
+        jLabel20.setText("Balcony:");
+        jLabel20.setFont(new java.awt.Font("Dialog", 1, 14));
+        jPanel2.add(jLabel20);
+
+        jLabelNTotalSeatsBalcony.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.BALCONY)));
+        jLabelNTotalSeatsBalcony.setForeground(java.awt.Color.darkGray);
+        jLabelNTotalSeatsBalcony.setFont(new java.awt.Font("Dialog", 0, 14));
+        jPanel2.add(jLabelNTotalSeatsBalcony);
+
+        jTextFieldNewNTotalSeats.setFont(new java.awt.Font("Dialog", 0, 18));
+        jTextFieldNewNTotalSeats.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.CIRCLE)));
+        jPanel2.add(jTextFieldNewNTotalSeats);
+
+        jButtonSetCircle.setFont(new java.awt.Font("Dialog", 0, 14));
+        jButtonSetCircle.setText("Set Circle");
+        jButtonSetCircle.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonSetCircleActionPerformed(evt);
+            }
+        });
+
+        jPanel2.add(jButtonSetCircle);
+
+        jButtonSetSalls.setFont(new java.awt.Font("Dialog", 0, 14));
+        jButtonSetSalls.setText(" Set Stalls");
+        jButtonSetSalls.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonSetSallsActionPerformed(evt);
+            }
+        });
+
+        jPanel2.add(jButtonSetSalls);
+
+        jButtonSetBalcony.setFont(new java.awt.Font("Dialog", 0, 14));
+        jButtonSetBalcony.setText("Set Balcony");
+        jButtonSetBalcony.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonSetBalconyActionPerformed(evt);
+            }
+        });
+
+        jPanel2.add(jButtonSetBalcony);
+
+        getContentPane().add(jPanel2, java.awt.BorderLayout.NORTH);
+
+        jScrollPane1.setAutoscrolls(true);
+        jTextArea.setEditable(false);
+        jTextArea.setRows(10);
+        jTextArea.setMargin(new java.awt.Insets(5, 5, 5, 5));
+        jScrollPane1.setViewportView(jTextArea);
+
+        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
+
+        jPanelLeft.setLayout(new javax.swing.BoxLayout(jPanelLeft, javax.swing.BoxLayout.Y_AXIS));
+
+        jLabel15.setText("Mode:");
+        jPanelLeft.add(jLabel15);
+
+        jLabelDisplayMode.setText("Automatic");
+        jLabelDisplayMode.setForeground(java.awt.Color.blue);
+        jLabelDisplayMode.setFont(new java.awt.Font("Dialog", 1, 18));
+        jPanelLeft.add(jLabelDisplayMode);
+
+        jButtonChangeMode.setText("Change mode");
+        jButtonChangeMode.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonChangeMode.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonChangeModeActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonChangeMode);
+
+        jLabelResponse.setText("Response:");
+        jPanelLeft.add(jLabelResponse);
+
+        jButtonConfirm.setText("Confirm");
+        jButtonConfirm.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonConfirm.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonConfirmActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonConfirm);
+
+        jButtonCancel.setText("Cancel");
+        jButtonCancel.setPreferredSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.setMaximumSize(new java.awt.Dimension(119, 27));
+        jButtonCancel.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                jButtonCancelActionPerformed(evt);
+            }
+        });
+
+        jPanelLeft.add(jButtonCancel);
+
+        getContentPane().add(jPanelLeft, java.awt.BorderLayout.WEST);
+
+        pack();
+    }//GEN-END:initComponents
+
+    /**
+     * Reset event handler.
+     */
+    private void jButtonResetFieldsActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonResetFieldsActionPerformed
+        theatreManager.setToDefault();
+        updateFields();
+    }//GEN-LAST:event_jButtonResetFieldsActionPerformed
+
+    /**
+     * Cancel event handler.
+     */
+    private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonCancelActionPerformed
+        if (theatreManager.getIsPreparationWaiting())
+        {
+            Object preparation = theatreManager.getPreparation();
+            try
+            {
+                theatreManager.setCommit(false);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("TheatreView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonCancelActionPerformed
+
+    /**
+     * Confirm event handler.
+     */
+    private void jButtonConfirmActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonConfirmActionPerformed
+        if (theatreManager.getIsPreparationWaiting())
+        {
+            Object preparation = theatreManager.getPreparation();
+            try
+            {
+                theatreManager.setCommit(true);
+                synchronized (preparation)
+                {
+                    preparation.notify();
+                }
+            }
+            catch (Exception e)
+            {
+                System.err.println("TheatreView.jButtonCancelActionPerformed(): Unable to notify preparation.");
+            }
+        }
+    }//GEN-LAST:event_jButtonConfirmActionPerformed
+
+    /**
+     * ChangeMode event handler.
+     */
+    private void jButtonChangeModeActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonChangeModeActionPerformed
+        if (theatreManager.isAutoCommitMode())
+            theatreManager.setAutoCommitMode(false);
+        else
+            theatreManager.setAutoCommitMode(true);
+        updateFields();
+    }//GEN-LAST:event_jButtonChangeModeActionPerformed
+
+    /**
+     * Seat reservation event handler.
+     */
+    private void jButtonSetCircleActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonSetCircleActionPerformed
+        String strNSeats = jTextFieldNewNTotalSeats.getText();
+
+        theatreManager.newCapacity(theatreManager.CIRCLE, Integer.parseInt(strNSeats));
+        int nFreeSeats = theatreManager.getNFreeSeats(theatreManager.CIRCLE);
+
+        jLabelNTotalSeatsCircle.setText(strNSeats);
+        jLabelNFreeSeatsCircle.setText(Integer.toString(nFreeSeats));
+    }//GEN-LAST:event_jButtonSetCircleActionPerformed
+
+    /**
+     * Seat reservation event handler.
+     */
+    private void jButtonSetSallsActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonSetSallsActionPerformed
+        String strNSeats = jTextFieldNewNTotalSeats.getText();
+
+        theatreManager.newCapacity(theatreManager.STALLS, Integer.parseInt(strNSeats));
+        int nFreeSeats = theatreManager.getNFreeSeats(theatreManager.STALLS);
+
+        jLabelNTotalSeatsStalls.setText(strNSeats);
+        jLabelNFreeSeatsStalls.setText(Integer.toString(nFreeSeats));
+    }//GEN-LAST:event_jButtonSetSallsActionPerformed
+
+    /**
+     * Seat reservation event handler.
+     */
+    private void jButtonSetBalconyActionPerformed(java.awt.event.ActionEvent evt)
+    {//GEN-FIRST:event_jButtonSetBalconyActionPerformed
+        String strNSeats = jTextFieldNewNTotalSeats.getText();
+
+        theatreManager.newCapacity(theatreManager.BALCONY, Integer.parseInt(strNSeats));
+        int nFreeSeats = theatreManager.getNFreeSeats(theatreManager.BALCONY);
+
+        jLabelNTotalSeatsBalcony.setText(strNSeats);
+        jLabelNFreeSeatsBalcony.setText(Integer.toString(nFreeSeats));
+    }//GEN-LAST:event_jButtonSetBalconyActionPerformed
+
+    /**
+     * Exit the application.
+     */
+    private void exitForm(java.awt.event.WindowEvent evt)
+    {//GEN-FIRST:event_exitForm
+        //System.exit(0); // disabled for embedding in application servers.
+    }//GEN-LAST:event_exitForm
+
+    /**
+     * Add regular text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(backButtonColor);
+        jButtonCancel.setBackground(backButtonColor);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+    /**
+     * Add status (highlighted) text to the central jTextArea.
+     *
+     * @param text The String to add
+     */
+    public void addPrepareMessage(java.lang.String text)
+    {
+        jButtonConfirm.setBackground(java.awt.Color.red);
+        jButtonCancel.setBackground(java.awt.Color.red);
+        jTextArea.append(text + "\n");
+        jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
+    }
+
+    /**
+     * Synchronise the GUI with the underlying state.
+     */
+    public void updateFields()
+    {
+        jLabelNTotalSeatsCircle.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.CIRCLE)));
+        jLabelNTotalSeatsStalls.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.STALLS)));
+        jLabelNTotalSeatsBalcony.setText(Integer.toString(theatreManager.getNTotalSeats(theatreManager.BALCONY)));
+        jTextFieldNewNTotalSeats.setText(jLabelNTotalSeatsCircle.getText());
+        jLabelNBookedSeatsCircle.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.CIRCLE)));
+        jLabelNBookedSeatsStalls.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.STALLS)));
+        jLabelNBookedSeatsBalcony.setText(Integer.toString(theatreManager.getNBookedSeats(theatreManager.BALCONY)));
+        jLabelNConfirmedSeatsCircle.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.CIRCLE)));
+        jLabelNConfirmedSeatsStalls.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.STALLS)));
+        jLabelNConfirmedSeatsBalcony.setText(Integer.toString(theatreManager.getNCommittedSeats(theatreManager.BALCONY)));
+        jLabelNFreeSeatsCircle.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.CIRCLE)));
+        jLabelNFreeSeatsStalls.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.STALLS)));
+        jLabelNFreeSeatsBalcony.setText(Integer.toString(theatreManager.getNFreeSeats(theatreManager.BALCONY)));
+
+
+        //update fields related to interactive mode
+        if (theatreManager.isAutoCommitMode())
+        {
+            jLabelResponse.setVisible(false);
+            jButtonConfirm.setVisible(false);
+            jButtonCancel.setVisible(false);
+            jLabelDisplayMode.setText("automatic");
+        }
+        else
+        {
+            jLabelResponse.setVisible(true);
+            jButtonConfirm.setVisible(true);
+            jButtonCancel.setVisible(true);
+            jLabelDisplayMode.setText("interactive");
+        }
+    }
+
+    /**
+     * Allow use of a singleton model for web services demo.
+     */
+    public static TheatreView getSingletonInstance()
+    {
+        if (singletonInstance == null)
+        {
+            singletonInstance = new TheatreView(TheatreManager.getSingletonInstance());
+        }
+
+        singletonInstance.show();
+        return singletonInstance;
+    }
+
+    /**
+     * A singleton instance of this class.
+     */
+    private static TheatreView singletonInstance;
+
+    // Variables declaration - automatically generated - do not modify
+
+    private javax.swing.JPanel jPanel1;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel3;
+    private javax.swing.JLabel jLabel29;
+    private javax.swing.JLabel jLabel30;
+    private javax.swing.JLabel jLabel25;
+    private javax.swing.JLabel jLabelNBookedSeatsCircle;
+    private javax.swing.JLabel jLabelNConfirmedSeatsCircle;
+    private javax.swing.JLabel jLabelNFreeSeatsCircle;
+    private javax.swing.JLabel jLabel35;
+    private javax.swing.JLabel jLabelNBookedSeatsStalls;
+    private javax.swing.JLabel jLabelNConfirmedSeatsStalls;
+    private javax.swing.JLabel jLabelNFreeSeatsStalls;
+    private javax.swing.JLabel jLabel28;
+    private javax.swing.JLabel jLabelNBookedSeatsBalcony;
+    private javax.swing.JLabel jLabelNConfirmedSeatsBalcony;
+    private javax.swing.JLabel jLabelNFreeSeatsBalcony;
+    private javax.swing.JLabel jLabel34;
+    private javax.swing.JButton jButtonResetFields;
+    private javax.swing.JPanel jPanel2;
+    private javax.swing.JLabel jLabel10;
+    private javax.swing.JLabel jLabel13;
+    private javax.swing.JLabel jLabel18;
+    private javax.swing.JLabel jLabelNTotalSeatsCircle;
+    private javax.swing.JLabel jLabel19;
+    private javax.swing.JLabel jLabelNTotalSeatsStalls;
+    private javax.swing.JLabel jLabel20;
+    private javax.swing.JLabel jLabelNTotalSeatsBalcony;
+    private javax.swing.JTextField jTextFieldNewNTotalSeats;
+    private javax.swing.JButton jButtonSetCircle;
+    private javax.swing.JButton jButtonSetSalls;
+    private javax.swing.JButton jButtonSetBalcony;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTextArea jTextArea;
+    private javax.swing.JPanel jPanelLeft;
+    private javax.swing.JLabel jLabel15;
+    private javax.swing.JLabel jLabelDisplayMode;
+    private javax.swing.JButton jButtonChangeMode;
+    private javax.swing.JLabel jLabelResponse;
+    private javax.swing.JButton jButtonConfirm;
+    private javax.swing.JButton jButtonCancel;
+
+    // End of automatically generated variables declarations
+
+    /**
+     * The  {@link TheatreManager} instance this view is bound to.
+     */
+    private TheatreManager theatreManager;
+
+    /**
+     * The current color of the back button.
+     */
+    private java.awt.Color backButtonColor;
+}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11 (from rev 18035, labs/jbosstm/workspace/adinn/XTSGF/demo/src)

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,618 +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.
- */
-/*
- * BasicClient.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
- *
- */
-
-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.client.JaxWSHeaderContextProcessorWS;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
-import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
-import com.jboss.jbosstm.xts.demo.taxi.ITaxiService;
-import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
-import com.jboss.jbosstm.xts.demo.theatre.ITheatreService;
-import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * A very basic client application that drives the
- * (transactional) Web Services to arrange a night out.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
- */
-public class BasicClient extends HttpServlet
-{
-    /**
-     * The client serial version UID.
-     */
-    private static final long serialVersionUID = 7728495576623420083L ;
-
-    /**
-     * The servlet context.
-     */
-    private ServletContext context ;
-
-    /***** RESTAURANT SERVICE *****/
-
-    /**
-     * The namespace for the Restaurant webservice.
-     */
-    private static final String RESTAURANT_NS = "http://www.jboss.com/jbosstm/xts/demo/Restaurant" ;
-    /**
-     * The prefix for the Restaurant webservice.
-     */
-    private static final String RESTAURANT_PREFIX = "restaurant";
-    /**
-     * The local name for the AT Restaurant webservice.
-     */
-    private static final String RESTAURANT_SERVICE_AT = "RestaurantServiceATService";
-    /**
-     * The QName for the AT Restaurant webservice.
-     */
-    private static final QName RESTAURANT_SERVICE_AT_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_AT, RESTAURANT_PREFIX);
-    /**
-     * The local name for the BA Restaurant webservice.
-     */
-    private static final String RESTAURANT_SERVICE_BA = "RestaurantServiceBAService" ;
-    /**
-     * The QName for the AT Restaurant webservice.
-     */
-    private static final QName RESTAURANT_SERVICE_BA_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_BA, RESTAURANT_PREFIX);
-    /**
-     * The local name for the AT Restaurant _.
-     */
-    private static final String RESTAURANT_ENDPOINT_AT = "RestaurantServiceAT";
-    /**
-     * The QName for the AT Restaurant endpoint.
-     */
-    private static final QName RESTAURANT_ENDPOINT_AT_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_AT, RESTAURANT_PREFIX);
-    /**
-     * The local name for the BA Restaurant endpoint.
-     */
-    private static final String RESTAURANT_ENDPOINT_BA = "RestaurantServiceBA";
-    /**
-     * The QName for the BA Restaurant endpoint.
-     */
-    private static final QName RESTAURANT_ENDPOINT_BA_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_BA, RESTAURANT_PREFIX);
-
-    /***** THEATRE SERVICE *****/
-
-    /**
-     * The namespace for the Theatre webservice.
-     */
-    private static final String THEATRE_NS = "http://www.jboss.com/jbosstm/xts/demo/Theatre" ;
-    /**
-     * The prefix for the Theatre webservice.
-     */
-    private static final String THEATRE_PREFIX = "theatre";
-    /**
-     * The local name for the AT Theatre webservice.
-     */
-    private static final String THEATRE_SERVICE_AT = "TheatreServiceATService";
-    /**
-     * The QName for the AT Theatre webservice.
-     */
-    private static final QName THEATRE_SERVICE_AT_QNAME
-            = new QName(THEATRE_NS, THEATRE_SERVICE_AT, THEATRE_PREFIX);
-    /**
-     * The local name for the BA Theatre webservice.
-     */
-    private static final String THEATRE_SERVICE_BA = "TheatreServiceBAService" ;
-    /**
-     * The QName for the AT Theatre webservice.
-     */
-    private static final QName THEATRE_SERVICE_BA_QNAME
-            = new QName(THEATRE_NS, THEATRE_SERVICE_BA, THEATRE_PREFIX);
-    /**
-     * The local name for the AT Theatre endpoint.
-     */
-    private static final String THEATRE_ENDPOINT_AT = "TheatreServiceAT";
-    /**
-     * The QName for the AT Theatre endpoint.
-     */
-    private static final QName THEATRE_ENDPOINT_AT_QNAME
-            = new QName(THEATRE_NS, THEATRE_ENDPOINT_AT, THEATRE_PREFIX);
-    /**
-     * The local name for the BA Theatre endpoint.
-     */
-    private static final String THEATRE_ENDPOINT_BA = "TheatreServiceBA";
-    /**
-     * The QName for the BA Theatre endpoint.
-     */
-    private static final QName THEATRE_ENDPOINT_BA_QNAME
-            = new QName(THEATRE_NS, THEATRE_ENDPOINT_BA, THEATRE_PREFIX);
-
-    /***** TAXI SERVICE *****/
-
-    /**
-     * The namespace for the Taxi webservice.
-     */
-    private static final String TAXI_NS = "http://www.jboss.com/jbosstm/xts/demo/Taxi" ;
-    /**
-     * The prefix for the Taxi webservice.
-     */
-    private static final String TAXI_PREFIX = "taxi";
-    /**
-     * The local name for the AT Taxi webservice.
-     */
-    private static final String TAXI_SERVICE_AT = "TaxiServiceATService";
-    /**
-     * The QName for the AT Taxi webservice.
-     */
-    private static final QName TAXI_SERVICE_AT_QNAME
-            = new QName(TAXI_NS, TAXI_SERVICE_AT, TAXI_PREFIX);
-    /**
-     * The local name for the BA Taxi webservice.
-     */
-    private static final String TAXI_SERVICE_BA = "TaxiServiceBAService" ;
-    /**
-     * The QName for the AT Taxi webservice.
-     */
-    private static final QName TAXI_SERVICE_BA_QNAME
-            = new QName(TAXI_NS, TAXI_SERVICE_BA, TAXI_PREFIX);
-    /**
-     * The local name for the AT Taxi endpoint.
-     */
-    private static final String TAXI_ENDPOINT_AT = "TaxiServiceAT";
-    /**
-     * The QName for the AT Taxi endpoint.
-     */
-    private static final QName TAXI_ENDPOINT_AT_QNAME
-            = new QName(TAXI_NS, TAXI_ENDPOINT_AT, TAXI_PREFIX);
-    /**
-     * The local name for the BA Taxi endpoint.
-     */
-    private static final String TAXI_ENDPOINT_BA = "TaxiServiceBA";
-    /**
-     * The QName for the BA Taxi endpoint.
-     */
-    private static final QName TAXI_ENDPOINT_BA_QNAME
-            = new QName(TAXI_NS, TAXI_ENDPOINT_BA, TAXI_PREFIX);
-
-    /***** Client Handles for Service Endpoint Ports *****/
-
-    /**
-     * The atomic transaction restaurant stub.
-     */
-    private IRestaurantService restaurantAT;
-    /**
-     * The atomic transaction theatre stub.
-     */
-    private ITheatreService theatreAT;
-    /**
-     * The atomic transaction taxi stub.
-     */
-    private ITaxiService taxiAT;
-    /**
-     * The business activity restaurant stub.
-     */
-    private IRestaurantServiceBA restaurantBA;
-    /**
-     * The business activity theatre stub.
-     */
-    private ITheatreServiceBA theatreBA;
-    /**
-     * The business activity taxi stub.
-     */
-    private ITaxiServiceBA taxiBA;
-
-    /***** Endpoint Addresses *****/
-
-    /**
-     * URL of restaurant AT
-     */
-    private String restaurantATURL ;
-    /**
-     * URL of restaurant BA
-     */
-    private String restaurantBAURL ;
-    /**
-     * URL of taxi AT
-     */
-    private String taxiATURL ;
-    /**
-     * URL of taxi BA
-     */
-    private String taxiBAURL ;
-    /**
-     * URL of theatre AT
-     */
-    private String theatreATURL ;
-    /**
-     * URL of theatre BA
-     */
-    private String theatreBAURL ;
-
-    /***** WSDL file locations *****/
-
-    /**
-     * URL of restaurant AT
-     */
-    private final String restaurantATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl";
-    /**
-     * URL of restaurant BA
-     */
-    private final String restaurantBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl";
-    /**
-     * URL of taxi AT
-     */
-    private final String taxiATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl";
-    /**
-     * URL of taxi BA
-     */
-    private final String taxiBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl";
-    /**
-     * URL of theatre AT
-     */
-    private final String theatreATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl";
-    /**
-     * URL of theatre BA
-     */
-    private final String theatreBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl";
-
-    /**
-     * The initialised flag.
-     */
-    private boolean initialised ;
-    
-    /**
-     * Initialise the servlet.
-     * @param config The servlet configuration.
-     */
-    public void init(final ServletConfig config)
-        throws ServletException
-    {
-        final String baseURL = "http://localhost:8080/xtsdemowebservices/" ;
-
-        restaurantATURL = getURL(config, "restaurantATURL", baseURL + RESTAURANT_SERVICE_AT);
-        restaurantBAURL = getURL(config, "restaurantBAURL", baseURL + RESTAURANT_SERVICE_BA);
-        taxiATURL = getURL(config, "taxiATURL", baseURL + TAXI_SERVICE_AT);
-        taxiBAURL = getURL(config, "taxiBAURL", baseURL + TAXI_SERVICE_BA);
-        theatreATURL = getURL(config, "theatreATURL", baseURL + THEATRE_SERVICE_AT);
-        theatreBAURL = getURL(config, "theatreBAURL", baseURL + THEATRE_SERVICE_BA);
-
-        context = config.getServletContext();
-    }
-
-    /**
-     * configure the XTS client handler which manages transaction flow for invocations of the services
-     *
-     * @param bindingProvider
-     */
-    private void configureClientHandler(BindingProvider bindingProvider)
-    {
-        Handler handler = new JaxWSHeaderContextProcessorWS();
-        List<Handler> handlers = Collections.singletonList(handler);
-        bindingProvider.getBinding().setHandlerChain(handlers);
-    }
-
-    /**
-     * Initialise if necessary
-     */
-    private synchronized void initialise()
-    throws ServletException
-    {
-        if (!initialised)
-        {
-            try
-            {
-                restaurantAT = getService(RESTAURANT_SERVICE_AT_QNAME, RESTAURANT_ENDPOINT_AT_QNAME,
-                        restaurantATURL, restaurantATWSDL, IRestaurantService.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                restaurantBA = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
-                        restaurantBAURL, restaurantBAWSDL, IRestaurantServiceBA.class);
-                configureClientHandler((BindingProvider)restaurantBA);
-
-                theatreAT = getService(THEATRE_SERVICE_AT_QNAME, THEATRE_ENDPOINT_AT_QNAME,
-                        theatreATURL, theatreATWSDL, ITheatreService.class);
-                configureClientHandler((BindingProvider)theatreAT);
-
-                theatreBA = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
-                        theatreBAURL, theatreBAWSDL, ITheatreServiceBA.class);
-                configureClientHandler((BindingProvider)theatreBA);
-
-                taxiAT = getService(TAXI_SERVICE_AT_QNAME, TAXI_ENDPOINT_AT_QNAME,
-                        taxiATURL, taxiATWSDL, ITaxiService.class);
-                configureClientHandler((BindingProvider)taxiAT);
-
-                taxiBA = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
-                        taxiBAURL, taxiBAWSDL, ITaxiServiceBA.class);
-                configureClientHandler((BindingProvider)taxiBA);
-
-                /*
-                W3CEndpointReference endpoint;
-
-                endpoint = getService(RESTAURANT_SERVICE_AT_QNAME, RESTAURANT_ENDPOINT_AT_QNAME,
-                        restaurantATURL, restaurantATWSDL);
-                restaurantAT = (IRestaurantService)endpoint.getPort(IRestaurantService.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                endpoint = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
-                        restaurantBAURL, restaurantBAWSDL);
-                restaurantBA = (IRestaurantServiceBA)endpoint.getPort(IRestaurantServiceBA.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                endpoint = getService(TAXI_SERVICE_AT_QNAME, TAXI_ENDPOINT_AT_QNAME,
-                        taxiATURL, taxiATWSDL);
-                taxiAT = (ITaxiService)endpoint.getPort(ITaxiService.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                endpoint = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
-                        taxiBAURL, taxiBAWSDL);
-                taxiBA = (ITaxiServiceBA)endpoint.getPort(ITaxiServiceBA.class) ;
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                endpoint = getService(THEATRE_SERVICE_AT_QNAME, THEATRE_ENDPOINT_AT_QNAME,
-                        theatreATURL, theatreATWSDL);
-                theatreAT = (ITheatreService)endpoint.getPort(ITheatreService.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-
-                endpoint = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
-                        theatreBAURL, theatreBAWSDL);
-                theatreBA = (ITheatreServiceBA)endpoint.getPort(ITheatreServiceBA.class);
-                configureClientHandler((BindingProvider)restaurantAT);
-                */
-            }
-            catch (final Exception ex)
-            {
-                ex.printStackTrace();
-                throw new ServletException(ex);
-            }
-            initialised = true ;
-        }
-    }
-
-    /**
-     * Simple wrapper to allow our test method to be invoked when
-     * running in a servlet container, taking parameters from the
-     * request URL and displaying the outcome on the resulting html page.
-     *
-     * @param request
-     * @param response
-     * @throws ServletException
-     * @throws IOException
-     */
-    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
-    {
-        initialise() ;
-
-        // get business logic params from the form submission.
-        int restaurantSeats = Integer.parseInt(request.getParameter("restaurant"));
-        int theatreSeats = Integer.parseInt(request.getParameter("theatrecount"));
-        int theatreArea = Integer.parseInt(request.getParameter("theatrearea"));
-        int taxiCount = Integer.parseInt(request.getParameter("taxi"));
-        boolean bookTaxi = (taxiCount >= 1 ? true : false);
-
-        String result = "Transaction finished OK.";
-        String txType = request.getParameter("txType");
-
-        try
-        {
-            if ("AtomicTransaction".equals(txType))
-            {
-                testAtomicTransaction(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
-            }
-            else if ("BusinessActivity".equals(txType))
-            {
-                testBusinessActivity(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
-            }
-            else
-            {
-                result = "Unknown transaction type " + txType;
-            }
-        }
-        catch (final TransactionRolledBackException tre)
-        {
-            result = "Transaction rolled back" ;
-            System.out.println("Transaction rolled back") ;
-        }
-        catch (Exception e)
-        {
-            result = "Transaction failed! Cause: " + e.toString();
-            System.out.println("CLIENT: problem: ");
-            e.printStackTrace(System.out);
-        }
-
-        request.setAttribute("result", result);
-        context.getRequestDispatcher("/index.jsp").forward(request, response);
-    }
-
-    /**
-     * Run a simple transaction involving three Web Services.
-     * Use the Atomic Transaction type.
-     * <p/>
-     * Note: due to the implementation of the transaction infrastructure,
-     * this method must be invoked with a web application container. It will
-     * not run correctly in a standalone java application.
-     *
-     * @throws Exception for any unexpected errors, such as a failure to commit.
-     */
-    private void testAtomicTransaction(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
-    {
-        System.out.println("CLIENT: obtaining userTransaction...");
-
-        UserTransaction ut = UserTransactionFactory.userTransaction();
-
-        System.out.println("CLIENT: starting the transaction...");
-
-        ut.begin();
-
-        System.out.println("CLIENT: transaction ID= " + ut.toString());
-
-        System.out.println("CLIENT: calling business Web Services...");
-
-        restaurantAT.bookSeats(restaurantSeats);
-        theatreAT.bookSeats(theatreSeats, theatreArea);
-        if (bookTaxi)
-        {
-            taxiAT.bookTaxi();
-        }
-
-        System.out.println("CLIENT: calling commit on the transaction...");
-
-        ut.commit();
-
-        System.out.println("done.");
-        System.out.flush();
-    }
-
-    /**
-     * Run a simple transaction involving three Web Services.
-     * Use the Business Activity type.
-     * <p/>
-     * Note: due to the implementation of the transaction infrastructure,
-     * this method must be invoked with a web application container. It will
-     * not run correctly in a standalone java application.
-     *
-     * @throws Exception for any unexpected errors, such as a failure to commit.
-     */
-    private void testBusinessActivity(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
-    {
-        System.out.println("CLIENT: obtaining userBusinessActivity...");
-
-        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
-
-        System.out.println("CLIENT: starting the transaction...");
-
-        uba.begin();
-
-        System.out.println("CLIENT: transaction ID= " + uba.toString());
-
-        System.out.println("CLIENT: calling business Web Services...");
-
-        boolean isOK = false ;
-        try
-        {
-            if (restaurantBA.bookSeats(restaurantSeats) && theatreBA.bookSeats(theatreSeats, theatreArea))
-            {
-                isOK = !bookTaxi || taxiBA.bookTaxi() ;
-            }
-        }
-        catch (final Throwable th)
-        {
-            System.out.println("CLIENT: caught exception processing bookings, cancelling (" + th.getMessage() + ")") ;
-        }
-
-        if (isOK)
-        {
-            System.out.println("CLIENT: all OK");
-            System.out.println("CLIENT: calling close on the transaction...");
-            uba.close();
-        }
-        else
-        {
-            System.out.println("CLIENT: one or more services failed, calling cancel.");
-            uba.cancel();
-        }
-
-        System.out.println("CLIENT: done.");
-        System.out.flush();
-    }
-
-    /**
-     * @param config The servlet config
-     * @param property The property name
-     * @param defaultValue The default value.
-     * @return The initialisation property value or the default value if not present. 
-     */
-    private String getURL(final ServletConfig config, final String property, final String defaultValue)
-    {
-        final String value = config.getInitParameter(property) ;
-        return (value == null ? defaultValue : value) ;
-    }
-    
-    /**
-     * Get an endpoint reference for a service so we can create a JaxWS port for it
-     * @param serviceName the QName of the service in question..
-     * @param endpointName the QName of the endpoint associated with the service
-     * @param address a string representation of the service URL. null is ok if this is a service located in the
-     * same app as the client
-     * @return a W3CEndpointReference from which the service port can be obtained.
-     */
-    private <T> T getService(final QName serviceName, final QName endpointName,
-                                            final String address, final String wsdlURL, final Class<T> clazz)
-            throws MalformedURLException
-    {
-        URL addressURL = new URL(address);
-        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;
-        }
-    }
-    */
-}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,601 @@
+/*
+ * 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.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.client;
+
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
+import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
+import com.jboss.jbosstm.xts.demo.taxi.ITaxiService;
+import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
+import com.jboss.jbosstm.xts.demo.theatre.ITheatreService;
+import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * A very basic client application that drives the
+ * (transactional) Web Services to arrange a night out.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ */
+public class BasicClient extends HttpServlet
+{
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = 7728495576623420083L ;
+
+    /**
+     * The servlet context.
+     */
+    private ServletContext context ;
+
+    /***** RESTAURANT SERVICE *****/
+
+    /**
+     * The namespace for the Restaurant webservice.
+     */
+    private static final String RESTAURANT_NS = "http://www.jboss.com/jbosstm/xts/demo/Restaurant" ;
+    /**
+     * The prefix for the Restaurant webservice.
+     */
+    private static final String RESTAURANT_PREFIX = "restaurant";
+    /**
+     * The local name for the AT Restaurant webservice.
+     */
+    private static final String RESTAURANT_SERVICE_AT = "RestaurantServiceATService";
+    /**
+     * The QName for the AT Restaurant webservice.
+     */
+    private static final QName RESTAURANT_SERVICE_AT_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_AT, RESTAURANT_PREFIX);
+    /**
+     * The local name for the BA Restaurant webservice.
+     */
+    private static final String RESTAURANT_SERVICE_BA = "RestaurantServiceBAService" ;
+    /**
+     * The QName for the AT Restaurant webservice.
+     */
+    private static final QName RESTAURANT_SERVICE_BA_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_BA, RESTAURANT_PREFIX);
+    /**
+     * The local name for the AT Restaurant _.
+     */
+    private static final String RESTAURANT_ENDPOINT_AT = "RestaurantServiceAT";
+    /**
+     * The QName for the AT Restaurant endpoint.
+     */
+    private static final QName RESTAURANT_ENDPOINT_AT_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_AT, RESTAURANT_PREFIX);
+    /**
+     * The local name for the BA Restaurant endpoint.
+     */
+    private static final String RESTAURANT_ENDPOINT_BA = "RestaurantServiceBA";
+    /**
+     * The QName for the BA Restaurant endpoint.
+     */
+    private static final QName RESTAURANT_ENDPOINT_BA_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_BA, RESTAURANT_PREFIX);
+
+    /***** THEATRE SERVICE *****/
+
+    /**
+     * The namespace for the Theatre webservice.
+     */
+    private static final String THEATRE_NS = "http://www.jboss.com/jbosstm/xts/demo/Theatre" ;
+    /**
+     * The prefix for the Theatre webservice.
+     */
+    private static final String THEATRE_PREFIX = "theatre";
+    /**
+     * The local name for the AT Theatre webservice.
+     */
+    private static final String THEATRE_SERVICE_AT = "TheatreServiceATService";
+    /**
+     * The QName for the AT Theatre webservice.
+     */
+    private static final QName THEATRE_SERVICE_AT_QNAME
+            = new QName(THEATRE_NS, THEATRE_SERVICE_AT, THEATRE_PREFIX);
+    /**
+     * The local name for the BA Theatre webservice.
+     */
+    private static final String THEATRE_SERVICE_BA = "TheatreServiceBAService" ;
+    /**
+     * The QName for the AT Theatre webservice.
+     */
+    private static final QName THEATRE_SERVICE_BA_QNAME
+            = new QName(THEATRE_NS, THEATRE_SERVICE_BA, THEATRE_PREFIX);
+    /**
+     * The local name for the AT Theatre endpoint.
+     */
+    private static final String THEATRE_ENDPOINT_AT = "TheatreServiceAT";
+    /**
+     * The QName for the AT Theatre endpoint.
+     */
+    private static final QName THEATRE_ENDPOINT_AT_QNAME
+            = new QName(THEATRE_NS, THEATRE_ENDPOINT_AT, THEATRE_PREFIX);
+    /**
+     * The local name for the BA Theatre endpoint.
+     */
+    private static final String THEATRE_ENDPOINT_BA = "TheatreServiceBA";
+    /**
+     * The QName for the BA Theatre endpoint.
+     */
+    private static final QName THEATRE_ENDPOINT_BA_QNAME
+            = new QName(THEATRE_NS, THEATRE_ENDPOINT_BA, THEATRE_PREFIX);
+
+    /***** TAXI SERVICE *****/
+
+    /**
+     * The namespace for the Taxi webservice.
+     */
+    private static final String TAXI_NS = "http://www.jboss.com/jbosstm/xts/demo/Taxi" ;
+    /**
+     * The prefix for the Taxi webservice.
+     */
+    private static final String TAXI_PREFIX = "taxi";
+    /**
+     * The local name for the AT Taxi webservice.
+     */
+    private static final String TAXI_SERVICE_AT = "TaxiServiceATService";
+    /**
+     * The QName for the AT Taxi webservice.
+     */
+    private static final QName TAXI_SERVICE_AT_QNAME
+            = new QName(TAXI_NS, TAXI_SERVICE_AT, TAXI_PREFIX);
+    /**
+     * The local name for the BA Taxi webservice.
+     */
+    private static final String TAXI_SERVICE_BA = "TaxiServiceBAService" ;
+    /**
+     * The QName for the AT Taxi webservice.
+     */
+    private static final QName TAXI_SERVICE_BA_QNAME
+            = new QName(TAXI_NS, TAXI_SERVICE_BA, TAXI_PREFIX);
+    /**
+     * The local name for the AT Taxi endpoint.
+     */
+    private static final String TAXI_ENDPOINT_AT = "TaxiServiceAT";
+    /**
+     * The QName for the AT Taxi endpoint.
+     */
+    private static final QName TAXI_ENDPOINT_AT_QNAME
+            = new QName(TAXI_NS, TAXI_ENDPOINT_AT, TAXI_PREFIX);
+    /**
+     * The local name for the BA Taxi endpoint.
+     */
+    private static final String TAXI_ENDPOINT_BA = "TaxiServiceBA";
+    /**
+     * The QName for the BA Taxi endpoint.
+     */
+    private static final QName TAXI_ENDPOINT_BA_QNAME
+            = new QName(TAXI_NS, TAXI_ENDPOINT_BA, TAXI_PREFIX);
+
+    /***** Client Handles for Service Endpoint Ports *****/
+
+    /**
+     * The atomic transaction restaurant stub.
+     */
+    private IRestaurantService restaurantAT;
+    /**
+     * The atomic transaction theatre stub.
+     */
+    private ITheatreService theatreAT;
+    /**
+     * The atomic transaction taxi stub.
+     */
+    private ITaxiService taxiAT;
+    /**
+     * The business activity restaurant stub.
+     */
+    private IRestaurantServiceBA restaurantBA;
+    /**
+     * The business activity theatre stub.
+     */
+    private ITheatreServiceBA theatreBA;
+    /**
+     * The business activity taxi stub.
+     */
+    private ITaxiServiceBA taxiBA;
+
+    /***** Endpoint Addresses *****/
+
+    /**
+     * URL of restaurant AT
+     */
+    private String restaurantATURL ;
+    /**
+     * URL of restaurant BA
+     */
+    private String restaurantBAURL ;
+    /**
+     * URL of taxi AT
+     */
+    private String taxiATURL ;
+    /**
+     * URL of taxi BA
+     */
+    private String taxiBAURL ;
+    /**
+     * URL of theatre AT
+     */
+    private String theatreATURL ;
+    /**
+     * URL of theatre BA
+     */
+    private String theatreBAURL ;
+
+    /***** WSDL file locations *****/
+
+    /**
+     * URL of restaurant AT
+     */
+    private final String restaurantATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/RestaurantServiceAT.wsdl";
+    /**
+     * URL of restaurant BA
+     */
+    private final String restaurantBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/RestaurantServiceBA.wsdl";
+    /**
+     * URL of taxi AT
+     */
+    private final String taxiATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TaxiServiceAT.wsdl";
+    /**
+     * URL of taxi BA
+     */
+    private final String taxiBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TaxiServiceBA.wsdl";
+    /**
+     * URL of theatre AT
+     */
+    private final String theatreATWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TheatreServiceAT.wsdl";
+    /**
+     * URL of theatre BA
+     */
+    private final String theatreBAWSDL = "file:/home/adinn/jboss/jbossts/vanilla/trunk/XTS/xts-install/demo/dd/jboss/wsdl/TheatreServiceBA.wsdl";
+
+    /**
+     * The initialised flag.
+     */
+    private boolean initialised ;
+    
+    /**
+     * Initialise the servlet.
+     * @param config The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        final String baseURL = "http://localhost:8080/xtsdemowebservices11/" ;
+
+        restaurantATURL = getURL(config, "restaurantATURL", baseURL + RESTAURANT_SERVICE_AT);
+        restaurantBAURL = getURL(config, "restaurantBAURL", baseURL + RESTAURANT_SERVICE_BA);
+        taxiATURL = getURL(config, "taxiATURL", baseURL + TAXI_SERVICE_AT);
+        taxiBAURL = getURL(config, "taxiBAURL", baseURL + TAXI_SERVICE_BA);
+        theatreATURL = getURL(config, "theatreATURL", baseURL + THEATRE_SERVICE_AT);
+        theatreBAURL = getURL(config, "theatreBAURL", baseURL + THEATRE_SERVICE_BA);
+
+        context = config.getServletContext();
+    }
+
+    /**
+     * configure the XTS client handler which manages transaction flow for invocations of the services
+     *
+     * @param bindingProvider
+     */
+    private void configureClientHandler(BindingProvider bindingProvider)
+    {
+        Handler handler = new JaxWSHeaderContextProcessor();
+        List<Handler> handlers = Collections.singletonList(handler);
+        bindingProvider.getBinding().setHandlerChain(handlers);
+    }
+
+    /**
+     * Initialise if necessary
+     */
+    private synchronized void initialise()
+    throws ServletException
+    {
+        if (!initialised)
+        {
+            try
+            {
+		UserTransaction ut = UserTransactionFactory.userTransaction();
+		UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+		System.out.println("Initialising basic client " + getClass().getCanonicalName());
+		System.out.println("userTransaction = " + ut.getClass().getCanonicalName());
+		System.out.println("userBusinessActivity = " + uba.getClass().getCanonicalName());
+
+                restaurantAT = getService(RESTAURANT_SERVICE_AT_QNAME, RESTAURANT_ENDPOINT_AT_QNAME,
+                        restaurantATURL, restaurantATWSDL, IRestaurantService.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                restaurantBA = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
+                        restaurantBAURL, restaurantBAWSDL, IRestaurantServiceBA.class);
+                configureClientHandler((BindingProvider)restaurantBA);
+
+                theatreAT = getService(THEATRE_SERVICE_AT_QNAME, THEATRE_ENDPOINT_AT_QNAME,
+                        theatreATURL, theatreATWSDL, ITheatreService.class);
+                configureClientHandler((BindingProvider)theatreAT);
+
+                theatreBA = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
+                        theatreBAURL, theatreBAWSDL, ITheatreServiceBA.class);
+                configureClientHandler((BindingProvider)theatreBA);
+
+                taxiAT = getService(TAXI_SERVICE_AT_QNAME, TAXI_ENDPOINT_AT_QNAME,
+                        taxiATURL, taxiATWSDL, ITaxiService.class);
+                configureClientHandler((BindingProvider)taxiAT);
+
+                taxiBA = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
+                        taxiBAURL, taxiBAWSDL, ITaxiServiceBA.class);
+                configureClientHandler((BindingProvider)taxiBA);
+
+                /*
+                W3CEndpointReference endpoint;
+
+                endpoint = getService(RESTAURANT_SERVICE_AT_QNAME, RESTAURANT_ENDPOINT_AT_QNAME,
+                        restaurantATURL, restaurantATWSDL);
+                restaurantAT = (IRestaurantService)endpoint.getPort(IRestaurantService.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                endpoint = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
+                        restaurantBAURL, restaurantBAWSDL);
+                restaurantBA = (IRestaurantServiceBA)endpoint.getPort(IRestaurantServiceBA.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                endpoint = getService(TAXI_SERVICE_AT_QNAME, TAXI_ENDPOINT_AT_QNAME,
+                        taxiATURL, taxiATWSDL);
+                taxiAT = (ITaxiService)endpoint.getPort(ITaxiService.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                endpoint = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
+                        taxiBAURL, taxiBAWSDL);
+                taxiBA = (ITaxiServiceBA)endpoint.getPort(ITaxiServiceBA.class) ;
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                endpoint = getService(THEATRE_SERVICE_AT_QNAME, THEATRE_ENDPOINT_AT_QNAME,
+                        theatreATURL, theatreATWSDL);
+                theatreAT = (ITheatreService)endpoint.getPort(ITheatreService.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+
+                endpoint = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
+                        theatreBAURL, theatreBAWSDL);
+                theatreBA = (ITheatreServiceBA)endpoint.getPort(ITheatreServiceBA.class);
+                configureClientHandler((BindingProvider)restaurantAT);
+                */
+            }
+            catch (final Exception ex)
+            {
+                ex.printStackTrace();
+                throw new ServletException(ex);
+            }
+            initialised = true ;
+        }
+    }
+
+    /**
+     * Simple wrapper to allow our test method to be invoked when
+     * running in a servlet container, taking parameters from the
+     * request URL and displaying the outcome on the resulting html page.
+     *
+     * @param request
+     * @param response
+     * @throws ServletException
+     * @throws IOException
+     */
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+    {
+        initialise() ;
+
+        // get business logic params from the form submission.
+        int restaurantSeats = Integer.parseInt(request.getParameter("restaurant"));
+        int theatreSeats = Integer.parseInt(request.getParameter("theatrecount"));
+        int theatreArea = Integer.parseInt(request.getParameter("theatrearea"));
+        int taxiCount = Integer.parseInt(request.getParameter("taxi"));
+        boolean bookTaxi = (taxiCount >= 1 ? true : false);
+
+        String result = "Transaction finished OK.";
+        String txType = request.getParameter("txType");
+
+        try
+        {
+            if ("AtomicTransaction".equals(txType))
+            {
+                testAtomicTransaction(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else if ("BusinessActivity".equals(txType))
+            {
+                testBusinessActivity(restaurantSeats, theatreSeats, theatreArea, bookTaxi);
+            }
+            else
+            {
+                result = "Unknown transaction type " + txType;
+            }
+        }
+        catch (final TransactionRolledBackException tre)
+        {
+            result = "Transaction rolled back" ;
+            System.out.println("Transaction rolled back") ;
+        }
+        catch (Exception e)
+        {
+            result = "Transaction failed! Cause: " + e.toString();
+            System.out.println("CLIENT: problem: ");
+            e.printStackTrace(System.out);
+        }
+
+        request.setAttribute("result", result);
+        context.getRequestDispatcher("/index.jsp").forward(request, response);
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Atomic Transaction type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testAtomicTransaction(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userTransaction...");
+
+        UserTransaction ut = UserTransactionFactory.userTransaction();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        ut.begin();
+
+        System.out.println("CLIENT: transaction ID= " + ut.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        restaurantAT.bookSeats(restaurantSeats);
+        theatreAT.bookSeats(theatreSeats, theatreArea);
+        if (bookTaxi)
+        {
+            taxiAT.bookTaxi();
+        }
+
+        System.out.println("CLIENT: calling commit on the transaction...");
+
+        ut.commit();
+
+        System.out.println("done.");
+        System.out.flush();
+    }
+
+    /**
+     * Run a simple transaction involving three Web Services.
+     * Use the Business Activity type.
+     * <p/>
+     * Note: due to the implementation of the transaction infrastructure,
+     * this method must be invoked with a web application container. It will
+     * not run correctly in a standalone java application.
+     *
+     * @throws Exception for any unexpected errors, such as a failure to commit.
+     */
+    private void testBusinessActivity(int restaurantSeats, int theatreSeats, int theatreArea, boolean bookTaxi) throws Exception
+    {
+        System.out.println("CLIENT: obtaining userBusinessActivity...");
+
+        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
+
+        System.out.println("CLIENT: starting the transaction...");
+
+        uba.begin();
+
+        System.out.println("CLIENT: transaction ID= " + uba.toString());
+
+        System.out.println("CLIENT: calling business Web Services...");
+
+        boolean isOK = false ;
+        try
+        {
+            if (restaurantBA.bookSeats(restaurantSeats) && theatreBA.bookSeats(theatreSeats, theatreArea))
+            {
+                isOK = !bookTaxi || taxiBA.bookTaxi() ;
+            }
+        }
+        catch (final Throwable th)
+        {
+            System.out.println("CLIENT: caught exception processing bookings, cancelling (" + th.getMessage() + ")") ;
+        }
+
+        if (isOK)
+        {
+            System.out.println("CLIENT: all OK");
+            System.out.println("CLIENT: calling close on the transaction...");
+            uba.close();
+        }
+        else
+        {
+            System.out.println("CLIENT: one or more services failed, calling cancel.");
+            uba.cancel();
+        }
+
+        System.out.println("CLIENT: done.");
+        System.out.flush();
+    }
+
+    /**
+     * @param config The servlet config
+     * @param property The property name
+     * @param defaultValue The default value.
+     * @return The initialisation property value or the default value if not present. 
+     */
+    private String getURL(final ServletConfig config, final String property, final String defaultValue)
+    {
+        final String value = config.getInitParameter(property) ;
+        return (value == null ? defaultValue : value) ;
+    }
+    
+    /**
+     * Get an endpoint reference for a service so we can create a JaxWS port for it
+     * @param serviceName the QName of the service in question..
+     * @param endpointName the QName of the endpoint associated with the service
+     * @param address a string representation of the service URL. null is ok if this is a service located in the
+     * same app as the client
+     * @return a W3CEndpointReference from which the service port can be obtained.
+     */
+    private <T> T getService(final QName serviceName, final QName endpointName,
+                                            final String address, final String wsdlURL, final Class<T> clazz)
+            throws MalformedURLException
+    {
+        URL addressURL = new URL(address);
+        Service service = Service.create(addressURL, serviceName);
+        return service.getPort(endpointName, clazz);
+    }
+
+    public BasicClient()
+    {
+        super();
+    }
+}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,103 +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.
- */
-/*
- * RestaurantServiceAT.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd
- *
- * $Id: RestaurantServiceAT.java,v 1.3 2004/12/01 16:26:44 kconner Exp $
- *
- */
-
-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.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.jws.WebMethod;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the RestaurantManager business API as a
- * transactional Web Service. Also logs events to a RestaurantView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.3 $
- */
- at WebService(serviceName="RestaurantServiceATService", portName="RestaurantServiceAT",
-        name = "RestaurantServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant",
-        wsdlLocation = "../wsdl/RestaurantServiceAT.wsdl")
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")                  
- at SOAPBinding(style=SOAPBinding.Style.RPC)
-public class RestaurantServiceAT implements IRestaurantService
-{
-    /**
-     * Book a number of seats in the restaurant
-     * Enrols a Participant if necessary, then passes
-     * the call through to the business logic.
-     *
-     * @param how_many The number of seats to book
-     */
-    @WebMethod
-    public void bookSeats(
-            @WebParam(name = "how_many", partName = "how_many")
-            int how_many)
-    {
-        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
-        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
-
-        String transactionId = null;
-        try
-        {
-            // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
-            System.out.println("RestaurantServiceAT transaction id =" + transactionId);
-
-            if (!restaurantManager.knowsAbout(transactionId))
-            {
-                System.out.println("RestaurantServiceAT - enrolling...");
-                // enlist the Participant for this service:
-                RestaurantParticipantAT restaurantParticipant = new RestaurantParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
-            }
-        }
-        catch (Exception e)
-        {
-            System.err.println("bookSeats: Participant enrolment failed");
-            e.printStackTrace(System.err);
-            return;
-        }
-
-        restaurantView.addMessage("******************************");
-
-        restaurantView.addMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
-
-        restaurantManager.bookSeats(transactionId, how_many);
-
-        restaurantView.addMessage("Request complete\n");
-        restaurantView.updateFields();
-    }
-}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd
+ *
+ * $Id: RestaurantServiceAT.java,v 1.3 2004/12/01 16:26:44 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.restaurant;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the RestaurantManager business API as a
+ * transactional Web Service. Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+ at WebService(serviceName="RestaurantServiceATService", portName="RestaurantServiceAT",
+        name = "RestaurantServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant",
+        wsdlLocation = "../wsdl/RestaurantServiceAT.wsdl")
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")                  
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+public class RestaurantServiceAT implements IRestaurantService
+{
+    /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book
+     */
+    @WebMethod
+    public void bookSeats(
+            @WebParam(name = "how_many", partName = "how_many")
+            int how_many)
+    {
+        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
+        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("RestaurantServiceAT transaction id =" + transactionId);
+
+            if (!restaurantManager.knowsAbout(transactionId))
+            {
+                System.out.println("RestaurantServiceAT - enrolling...");
+                // enlist the Participant for this service:
+                RestaurantParticipantAT restaurantParticipant = new RestaurantParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookSeats: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        restaurantView.addMessage("******************************");
+
+        restaurantView.addMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
+
+        restaurantManager.bookSeats(transactionId, how_many);
+
+        restaurantView.addMessage("Request complete\n");
+        restaurantView.updateFields();
+    }
+}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,151 +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.
- */
-/*
- * RestaurantServiceBA.java
- *
- * Copyright (c) 2004 Arjuna Technologies Ltd
- *
- * $Id: RestaurantServiceBA.java,v 1.5 2004/12/01 16:26:44 kconner Exp $
- *
- */
-
-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.wst.BAParticipantManagerWS;
-import com.arjuna.wst.SystemException;
-import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
-
-import javax.jws.*;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the RestaurantManager business API as a
- * transactional Web Service. Also logs events to a RestaurantView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.5 $
- */
- at WebService(serviceName="RestaurantServiceBAService", portName="RestaurantServiceBA",
-        name = "RestaurantServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant",
-        wsdlLocation = "../wsdl/RestaurantServiceBA.wsdl")
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
- at SOAPBinding(style=SOAPBinding.Style.RPC)
-public class RestaurantServiceBA implements IRestaurantServiceBA
-{
-    /**
-     * Book a number of seats in the restaurant
-     * Enrols a Participant if necessary and passes
-     * the call through to the business logic.
-     *
-     * @param how_many The number of seats to book.
-     * @return true on success, false otherwise.
-     */
-    @WebMethod
-    @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
-    public boolean bookSeats(
-            @WebParam(name = "how_many", partName = "how_many")
-            int how_many)
-    {
-        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
-        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
-
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
-
-        // get the transaction context of this thread:
-        String transactionId = null;
-        try
-        {
-            transactionId = activityManager.currentTransaction().toString();
-        }
-        catch (SystemException e)
-        {
-            System.err.println("bookSeats: unable to obtain a transaction context!");
-            e.printStackTrace(System.err);
-            return false;
-        }
-
-        // log the event:
-        System.out.println("RestaurantServiceBA transaction id =" + transactionId);
-
-        restaurantView.addMessage("******************************");
-
-        restaurantView.addPrepareMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
-        restaurantView.updateFields();
-
-        // invoke the backend business logic:
-        restaurantManager.bookSeats(transactionId, how_many);
-
-        // attempt to finalise the booking
-        // (it will be compensated later if necessary)
-        if (restaurantManager.prepareSeats(transactionId))
-        {
-            restaurantView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
-            restaurantView.updateFields();
-
-            // it worked, so now we need a participant enlisted in case of compensation:
-
-            RestaurantParticipantBA restaurantParticipant = new RestaurantParticipantBA(transactionId, how_many);
-            // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
-            try
-            {
-                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(restaurantParticipant, new Uid().toString());
-            }
-            catch (Exception e)
-            {
-                restaurantView.addMessage("id:" + transactionId + ". Participant enrolement failed");
-                System.err.println("bookSeats: Participant enlistment failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-
-            // finish the booking in the backend:
-            restaurantManager.commitSeats(transactionId);
-
-            try
-            {
-                // tell the manager we have finished our work:
-                participantManager.completed();
-            }
-            catch (Exception e)
-            {
-                System.err.println("bookSeats: 'completed' callback failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-        }
-        else
-        {
-            restaurantView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
-            restaurantManager.cancelSeats(transactionId);
-            restaurantView.updateFields();
-            return false;
-        }
-
-        restaurantView.addMessage("Request complete\n");
-        restaurantView.updateFields();
-
-        return true;
-    }
-}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+/*
+ * RestaurantServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd
+ *
+ * $Id: RestaurantServiceBA.java,v 1.5 2004/12/01 16:26:44 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.restaurant;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the RestaurantManager business API as a
+ * transactional Web Service. Also logs events to a RestaurantView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+ at WebService(serviceName="RestaurantServiceBAService", portName="RestaurantServiceBA",
+        name = "RestaurantServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant",
+        wsdlLocation = "../wsdl/RestaurantServiceBA.wsdl")
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+public class RestaurantServiceBA implements IRestaurantServiceBA
+{
+    /**
+     * Book a number of seats in the restaurant
+     * Enrols a Participant if necessary and passes
+     * the call through to the business logic.
+     *
+     * @param how_many The number of seats to book.
+     * @return true on success, false otherwise.
+     */
+    @WebMethod
+    @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
+    public boolean bookSeats(
+            @WebParam(name = "how_many", partName = "how_many")
+            int how_many)
+    {
+        RestaurantView restaurantView = RestaurantView.getSingletonInstance();
+        RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookSeats: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        // log the event:
+        System.out.println("RestaurantServiceBA transaction id =" + transactionId);
+
+        restaurantView.addMessage("******************************");
+
+        restaurantView.addPrepareMessage("id:" + transactionId + ". Received a booking request for one table of " + how_many + " people");
+        restaurantView.updateFields();
+
+        // invoke the backend business logic:
+        restaurantManager.bookSeats(transactionId, how_many);
+
+        // attempt to finalise the booking
+        // (it will be compensated later if necessary)
+        if (restaurantManager.prepareSeats(transactionId))
+        {
+            restaurantView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            restaurantView.updateFields();
+
+            // it worked, so now we need a participant enlisted in case of compensation:
+
+            RestaurantParticipantBA restaurantParticipant = new RestaurantParticipantBA(transactionId, how_many);
+            // enlist the Participant for this service:
+            BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(restaurantParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                restaurantView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookSeats: Participant enlistment failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            // finish the booking in the backend:
+            restaurantManager.commitSeats(transactionId);
+
+            try
+            {
+                // tell the manager we have finished our work:
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookSeats: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            restaurantView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
+            restaurantManager.cancelSeats(transactionId);
+            restaurantView.updateFields();
+            return false;
+        }
+
+        restaurantView.addMessage("Request complete\n");
+        restaurantView.updateFields();
+
+        return true;
+    }
+}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,102 +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.
- */
-/*
- * TaxiServiceAT.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: TaxiServiceAT.java,v 1.3 2004/12/01 16:27:01 kconner Exp $
- *
- */
-
-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.jboss.jbosstm.xts.demo.taxi.ITaxiService;
-
-import javax.jws.WebService;
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the TaxiManager business API as a
- * transactional Web Service. Also logs events to a TaxiView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.3 $
- */
- at WebService(serviceName="TaxiServiceATService", portName="TaxiServiceAT",
-        name = "TaxiServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi",
-        wsdlLocation = "../wsdl/TaxiServiceAT.wsdl")
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
- at SOAPBinding(style=SOAPBinding.Style.RPC)
-public class TaxiServiceAT implements ITaxiService
-{
-    /**
-     * Book a taxi
-     * Enrols a Participant if necessary, then passes
-     * the call through to the business logic.
-     */
-    @WebMethod
-    public void bookTaxi()
-    {
-        TaxiView taxiView = TaxiView.getSingletonInstance();
-        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
-
-        String transactionId = null;
-        try
-        {
-            // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
-            System.out.println("TaxiServiceAT transaction id =" + transactionId);
-
-            if (!taxiManager.knowsAbout(transactionId))
-            {
-                System.out.println("TaxiServiceAT - enrolling...");
-                // enlist the Participant for this service:
-                TaxiParticipantAT taxiParticipant = new TaxiParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
-            }
-        }
-        catch (Exception e)
-        {
-            System.err.println("bookTaxi: Participant enrolment failed");
-            e.printStackTrace(System.err);
-            return;
-        }
-
-        taxiView.addMessage("******************************");
-
-        taxiView.addMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
-
-        TaxiManager.getSingletonInstance().bookTaxi(transactionId);
-
-        taxiView.addMessage("Request complete\n");
-        taxiView.updateFields();
-    }
-}
-
-
-
-

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiServiceAT.java,v 1.3 2004/12/01 16:27:01 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.taxi;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.jboss.jbosstm.xts.demo.taxi.ITaxiService;
+
+import javax.jws.WebService;
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the TaxiManager business API as a
+ * transactional Web Service. Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+ at WebService(serviceName="TaxiServiceATService", portName="TaxiServiceAT",
+        name = "TaxiServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi",
+        wsdlLocation = "../wsdl/TaxiServiceAT.wsdl")
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+public class TaxiServiceAT implements ITaxiService
+{
+    /**
+     * Book a taxi
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     */
+    @WebMethod
+    public void bookTaxi()
+    {
+        TaxiView taxiView = TaxiView.getSingletonInstance();
+        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("TaxiServiceAT transaction id =" + transactionId);
+
+            if (!taxiManager.knowsAbout(transactionId))
+            {
+                System.out.println("TaxiServiceAT - enrolling...");
+                // enlist the Participant for this service:
+                TaxiParticipantAT taxiParticipant = new TaxiParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookTaxi: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        taxiView.addMessage("******************************");
+
+        taxiView.addMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
+
+        TaxiManager.getSingletonInstance().bookTaxi(transactionId);
+
+        taxiView.addMessage("Request complete\n");
+        taxiView.updateFields();
+    }
+}
+
+
+
+

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,153 +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.
- */
-/*
- * TaxiServiceBA.java
- *
- * Copyright (c) 2004 Arjuna Technologies Ltd.
- *
- * $Id: TaxiServiceBA.java,v 1.5 2004/12/01 16:27:01 kconner Exp $
- *
- */
-
-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.wst.BAParticipantManagerWS;
-import com.arjuna.wst.SystemException;
-import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the TaxiManager business API as a
- * transactional Web Service. Also logs events to a TaxiView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.5 $
- */
- at WebService(serviceName="TaxiServiceBAService", portName="TaxiServiceBA",
-        name = "TaxiServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi",
-        wsdlLocation = "../wsdl/TaxiServiceBA.wsdl")
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
- at SOAPBinding(style=SOAPBinding.Style.RPC)
-public class TaxiServiceBA implements ITaxiServiceBA
-{
-    /**
-     * Book a taxi
-     * Enrols a Participant if necessary and passes
-     * the call through to the business logic.
-     *
-     * @return true on success, false otherwise.
-     */
-    @WebMethod
-    @WebResult(name = "bookTaxiBAResponse", partName = "bookTaxiBAResponse")
-    public boolean bookTaxi()
-    {
-        TaxiView taxiView = TaxiView.getSingletonInstance();
-        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
-
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
-
-        // get the transaction context of this thread:
-        String transactionId = null;
-        try
-        {
-            transactionId = activityManager.currentTransaction().toString();
-        }
-        catch (SystemException e)
-        {
-            System.err.println("bookTaxi: unable to obtain a transaction context!");
-            e.printStackTrace(System.err);
-            return false;
-        }
-
-        // log the event:
-        System.out.println("TaxiServiceBA transaction id =" + transactionId);
-
-        taxiView.addMessage("******************************");
-
-        taxiView.addPrepareMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
-        taxiView.updateFields();
-
-        // invoke the backend business logic:
-        taxiManager.bookTaxi(transactionId);
-
-        // attempt to finalise the booking
-        if (taxiManager.prepareTaxi(transactionId))
-        {
-            taxiView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
-            taxiView.updateFields();
-
-            // it worked, so now we need a participant enlisted in case of compensation:
-            TaxiParticipantBA taxiParticipant = new TaxiParticipantBA(transactionId);
-            // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
-            try
-            {
-                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(taxiParticipant, new Uid().toString());
-            }
-            catch (Exception e)
-            {
-                taxiView.addMessage("id:" + transactionId + ". Participant enrolement failed");
-                System.err.println("bookTaxi: Participant enrolment failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-
-            // finish the booking in the backend:
-            taxiManager.commitTaxi(transactionId);
-
-            try
-            {
-                // tell the manager we have finished our work:
-                participantManager.completed();
-            }
-            catch (Exception e)
-            {
-                System.err.println("bookTaxi: 'completed' callback failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-        }
-        else
-        {
-            taxiView.addMessage("id:" + transactionId + ". Failed to reserve taxi. Cancelling.");
-            taxiManager.cancelTaxi(transactionId);
-            taxiView.updateFields();
-            return false;
-        }
-
-        taxiView.addMessage("Request complete\n");
-        taxiView.updateFields();
-
-        return true;
-    }
-}
-
-
-
-

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ */
+/*
+ * TaxiServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TaxiServiceBA.java,v 1.5 2004/12/01 16:27:01 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.taxi;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the TaxiManager business API as a
+ * transactional Web Service. Also logs events to a TaxiView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+ at WebService(serviceName="TaxiServiceBAService", portName="TaxiServiceBA",
+        name = "TaxiServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi",
+        wsdlLocation = "../wsdl/TaxiServiceBA.wsdl")
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+public class TaxiServiceBA implements ITaxiServiceBA
+{
+    /**
+     * Book a taxi
+     * Enrols a Participant if necessary and passes
+     * the call through to the business logic.
+     *
+     * @return true on success, false otherwise.
+     */
+    @WebMethod
+    @WebResult(name = "bookTaxiBAResponse", partName = "bookTaxiBAResponse")
+    public boolean bookTaxi()
+    {
+        TaxiView taxiView = TaxiView.getSingletonInstance();
+        TaxiManager taxiManager = TaxiManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookTaxi: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        // log the event:
+        System.out.println("TaxiServiceBA transaction id =" + transactionId);
+
+        taxiView.addMessage("******************************");
+
+        taxiView.addPrepareMessage("id:" + transactionId.toString() + ". Received a taxi booking request");
+        taxiView.updateFields();
+
+        // invoke the backend business logic:
+        taxiManager.bookTaxi(transactionId);
+
+        // attempt to finalise the booking
+        if (taxiManager.prepareTaxi(transactionId))
+        {
+            taxiView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            taxiView.updateFields();
+
+            // it worked, so now we need a participant enlisted in case of compensation:
+            TaxiParticipantBA taxiParticipant = new TaxiParticipantBA(transactionId);
+            // enlist the Participant for this service:
+            BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(taxiParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                taxiView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookTaxi: Participant enrolment failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            // finish the booking in the backend:
+            taxiManager.commitTaxi(transactionId);
+
+            try
+            {
+                // tell the manager we have finished our work:
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookTaxi: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            taxiView.addMessage("id:" + transactionId + ". Failed to reserve taxi. Cancelling.");
+            taxiManager.cancelTaxi(transactionId);
+            taxiView.updateFields();
+            return false;
+        }
+
+        taxiView.addMessage("Request complete\n");
+        taxiView.updateFields();
+
+        return true;
+    }
+}
+
+
+
+

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,106 +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.
- */
-/*
- * TheatreServiceAT.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: TheatreServiceAT.java,v 1.3 2004/12/01 16:27:21 kconner Exp $
- *
- */
-
-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.jboss.jbosstm.xts.demo.theatre.ITheatreService;
-
-import javax.jws.WebService;
-import javax.jws.WebParam;
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the TheatreManager business API as a
- * transactional Web Service. Also logs events to a TheatreView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.3 $
- */
- at WebService(serviceName="TheatreServiceATService", portName="TheatreServiceAT",
-        name = "TheatreServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre",
-        wsdlLocation = "../wsdl/TheatreServiceAT.wsdl")
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
- at SOAPBinding(style=SOAPBinding.Style.RPC)
-public class TheatreServiceAT implements ITheatreService
-{
-    /**
-     * Book a number of seats in the Theatre
-     * Enrols a Participant if necessary, then passes
-     * the call through to the business logic.
-     *
-     * @param how_many   The number of seats to book
-     * @param which_area The area of the theatre to book seats in
-     */
-    @WebMethod
-    public void bookSeats(
-        @WebParam(name = "how_many", partName = "how_many")
-        int how_many,
-        @WebParam(name = "which_area", partName = "which_area")
-        int which_area)
-    {
-        TheatreView theatreView = TheatreView.getSingletonInstance();
-        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
-
-        String transactionId = null;
-        try
-        {
-            // get the transaction context of this thread:
-            transactionId = UserTransactionFactory.userTransaction().toString();
-            System.out.println("TheatreServiceAT transaction id =" + transactionId);
-
-            if (!theatreManager.knowsAbout(transactionId))
-            {
-                System.out.println("theatreService - enrolling...");
-                // enlist the Participant for this service:
-                TheatreParticipantAT theatreParticipant = new TheatreParticipantAT(transactionId);
-                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
-            }
-        }
-        catch (Exception e)
-        {
-            System.err.println("bookSeats: Participant enrolment failed");
-            e.printStackTrace(System.err);
-            return;
-        }
-
-        theatreView.addMessage("******************************");
-
-        theatreView.addMessage("id:" + transactionId.toString() + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
-
-        TheatreManager.getSingletonInstance().bookSeats(transactionId, how_many, which_area);
-
-        theatreView.addMessage("Request complete\n");
-        theatreView.updateFields();
-    }
-}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreServiceAT.java,v 1.3 2004/12/01 16:27:21 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.theatre;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.jboss.jbosstm.xts.demo.theatre.ITheatreService;
+
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the TheatreManager business API as a
+ * transactional Web Service. Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.3 $
+ */
+ at WebService(serviceName="TheatreServiceATService", portName="TheatreServiceAT",
+        name = "TheatreServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre",
+        wsdlLocation = "../wsdl/TheatreServiceAT.wsdl")
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+public class TheatreServiceAT implements ITheatreService
+{
+    /**
+     * Book a number of seats in the Theatre
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many   The number of seats to book
+     * @param which_area The area of the theatre to book seats in
+     */
+    @WebMethod
+    public void bookSeats(
+        @WebParam(name = "how_many", partName = "how_many")
+        int how_many,
+        @WebParam(name = "which_area", partName = "which_area")
+        int which_area)
+    {
+        TheatreView theatreView = TheatreView.getSingletonInstance();
+        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
+
+        String transactionId = null;
+        try
+        {
+            // get the transaction context of this thread:
+            transactionId = UserTransactionFactory.userTransaction().toString();
+            System.out.println("TheatreServiceAT transaction id =" + transactionId);
+
+            if (!theatreManager.knowsAbout(transactionId))
+            {
+                System.out.println("theatreService - enrolling...");
+                // enlist the Participant for this service:
+                TheatreParticipantAT theatreParticipant = new TheatreParticipantAT(transactionId);
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("bookSeats: Participant enrolment failed");
+            e.printStackTrace(System.err);
+            return;
+        }
+
+        theatreView.addMessage("******************************");
+
+        theatreView.addMessage("id:" + transactionId.toString() + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
+
+        TheatreManager.getSingletonInstance().bookSeats(transactionId, how_many, which_area);
+
+        theatreView.addMessage("Request complete\n");
+        theatreView.updateFields();
+    }
+}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/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-22 16:19:36 UTC (rev 18035)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -1,147 +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.
- */
-/*
- * TheatreServiceBA.java
- *
- * Copyright (c) 2004 Arjuna Technologies Ltd.
- *
- * $Id: TheatreServiceBA.java,v 1.5 2004/12/01 16:27:21 kconner Exp $
- *
- */
-
-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.wst.BAParticipantManagerWS;
-import com.arjuna.wst.SystemException;
-import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
-
-import javax.jws.*;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * An adapter class that exposes the TheatreManager business API as a
- * transactional Web Service. Also logs events to a TheatreView object.
- *
- * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
- * @version $Revision: 1.5 $
- */
- at WebService(serviceName="TheatreServiceBAService", portName="TheatreServiceBA",
-        name = "TheatreServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre",
-        wsdlLocation = "../wsdl/TheatreServiceBA.wsdl")
- at SOAPBinding(style=SOAPBinding.Style.RPC)
- at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
-public class TheatreServiceBA implements ITheatreServiceBA
-{
-    /**
-     * Book a number of seats in the Theatre
-     * Enrols a Participant if necessary, then passes
-     * the call through to the business logic.
-     *
-     * @param how_many   The number of seats to book.
-     * @param which_area The area of the theatre to book seats in.
-     * @return true on success, false otherwise.
-     */
-    @WebMethod
-    @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
-    public boolean bookSeats(
-            @WebParam(name = "how_many", partName = "how_many")
-            int how_many,
-            @WebParam(name = "which_area", partName = "which_area")
-            int which_area)
-
-    {
-        TheatreView theatreView = TheatreView.getSingletonInstance();
-        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
-
-        BusinessActivityManagerWS activityManager = BusinessActivityManagerFactoryWS.businessActivityManager();
-
-        // get the transaction context of this thread:
-        String transactionId = null;
-        try
-        {
-            transactionId = activityManager.currentTransaction().toString();
-        }
-        catch (SystemException e)
-        {
-            System.err.println("bookSeats: unable to obtain a transaction context!");
-            e.printStackTrace(System.err);
-            return false;
-        }
-
-        System.out.println("TheatreServiceBA transaction id =" + transactionId);
-
-        theatreView.addMessage("******************************");
-
-        theatreView.addPrepareMessage("id:" + transactionId + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
-        theatreView.updateFields();
-
-        theatreManager.bookSeats(transactionId, how_many, which_area);
-
-        if (theatreManager.prepareSeats(transactionId))
-        {
-            theatreView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
-            theatreView.updateFields();
-
-            TheatreParticipantBA theatreParticipant = new TheatreParticipantBA(transactionId, how_many, which_area);
-            // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
-            try
-            {
-                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(theatreParticipant, new Uid().toString());
-            }
-            catch (Exception e)
-            {
-                theatreView.addMessage("id:" + transactionId + ". Participant enrolement failed");
-                System.err.println("bookSeats: Participant enrolement failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-
-            theatreManager.commitSeats(transactionId);
-
-            try
-            {
-                participantManager.completed();
-            }
-            catch (Exception e)
-            {
-                System.err.println("bookSeats: 'completed' callback failed");
-                e.printStackTrace(System.err);
-                return false;
-            }
-        }
-        else
-        {
-            theatreView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
-            theatreManager.cancelSeats(transactionId);
-            theatreView.updateFields();
-            return false;
-        }
-
-        theatreView.addMessage("Request complete\n");
-        theatreView.updateFields();
-
-        return true;
-    }
-}

Copied: labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java (from rev 18124, labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java)
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src11/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+/*
+ * TheatreServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: TheatreServiceBA.java,v 1.5 2004/12/01 16:27:21 kconner Exp $
+ *
+ */
+
+package com.jboss.jbosstm.xts.demo.services.theatre;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An adapter class that exposes the TheatreManager business API as a
+ * transactional Web Service. Also logs events to a TheatreView object.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at arjuna.com)
+ * @version $Revision: 1.5 $
+ */
+ at WebService(serviceName="TheatreServiceBAService", portName="TheatreServiceBA",
+        name = "TheatreServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre",
+        wsdlLocation = "../wsdl/TheatreServiceBA.wsdl")
+ at SOAPBinding(style=SOAPBinding.Style.RPC)
+ at HandlerChain(file = "../context-handlers.xml", name = "Context Handlers")
+public class TheatreServiceBA implements ITheatreServiceBA
+{
+    /**
+     * Book a number of seats in the Theatre
+     * Enrols a Participant if necessary, then passes
+     * the call through to the business logic.
+     *
+     * @param how_many   The number of seats to book.
+     * @param which_area The area of the theatre to book seats in.
+     * @return true on success, false otherwise.
+     */
+    @WebMethod
+    @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
+    public boolean bookSeats(
+            @WebParam(name = "how_many", partName = "how_many")
+            int how_many,
+            @WebParam(name = "which_area", partName = "which_area")
+            int which_area)
+
+    {
+        TheatreView theatreView = TheatreView.getSingletonInstance();
+        TheatreManager theatreManager = TheatreManager.getSingletonInstance();
+
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
+
+        // get the transaction context of this thread:
+        String transactionId = null;
+        try
+        {
+            transactionId = activityManager.currentTransaction().toString();
+        }
+        catch (SystemException e)
+        {
+            System.err.println("bookSeats: unable to obtain a transaction context!");
+            e.printStackTrace(System.err);
+            return false;
+        }
+
+        System.out.println("TheatreServiceBA transaction id =" + transactionId);
+
+        theatreView.addMessage("******************************");
+
+        theatreView.addPrepareMessage("id:" + transactionId + ". Received a theatre booking request for " + how_many + " seats in area " + which_area);
+        theatreView.updateFields();
+
+        theatreManager.bookSeats(transactionId, how_many, which_area);
+
+        if (theatreManager.prepareSeats(transactionId))
+        {
+            theatreView.addMessage("id:" + transactionId + ". Seats prepared, trying to commit and enlist compensation Participant");
+            theatreView.updateFields();
+
+            TheatreParticipantBA theatreParticipant = new TheatreParticipantBA(transactionId, how_many, which_area);
+            // enlist the Participant for this service:
+            BAParticipantManager participantManager = null;
+            try
+            {
+                participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(theatreParticipant, new Uid().toString());
+            }
+            catch (Exception e)
+            {
+                theatreView.addMessage("id:" + transactionId + ". Participant enrolement failed");
+                System.err.println("bookSeats: Participant enrolement failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+
+            theatreManager.commitSeats(transactionId);
+
+            try
+            {
+                participantManager.completed();
+            }
+            catch (Exception e)
+            {
+                System.err.println("bookSeats: 'completed' callback failed");
+                e.printStackTrace(System.err);
+                return false;
+            }
+        }
+        else
+        {
+            theatreView.addMessage("id:" + transactionId + ". Failed to reserve seats. Cancelling.");
+            theatreManager.cancelSeats(transactionId);
+            theatreView.updateFields();
+            return false;
+        }
+
+        theatreView.addMessage("Request complete\n");
+        theatreView.updateFields();
+
+        return true;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/web/index11.jsp
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/web/index11.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/web/index11.jsp	2008-01-30 15:35:08 UTC (rev 18206)
@@ -0,0 +1,253 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+
+<!-- $Id:$ -->
+
+<head>
+<title>XML Transaction Service 1.1 Demo Application Client</title>
+</head>
+
+<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" vlink="#336699" alink="#003366" link="#003366" text="#000000" bgcolor="#ffffff">
+
+<!-- logo and header text -->
+<table width="740" cellpadding="0" cellspacing="0" border="0">
+  <tr>
+    <td colspan="2" height="28">&nbsp;</td>
+  </tr>
+  <tr>
+    <td width="20">&nbsp;</td>
+    <td align="center" width="170" bgcolor="#ffffff">
+      <img src="images/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" border="0">
+    </td>
+    <td width="20">&nbsp;</td>
+    <td valign="middle" align="left" width="530" bgcolor="#ffffff">
+      <br/>
+      <font size="5" style="font-family: Arial, Helvetica, sans-serif">
+        XML Transaction Service 1.1 Demonstrator Application
+      </font>
+    </td>
+  </tr>
+</table>
+
+
+<TABLE width="740" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD width="20">&nbsp;</TD><TD valign="top" width="170">
+
+<!-- nav menu -->
+<TABLE width="170" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD height="20" width="10" bgcolor="#ffffff">&nbsp;</TD><TD height="20" width="10" bgcolor="#ffffff">&nbsp;</TD><TD height="20" width="130" bgcolor="#ffffff">&nbsp;</TD><TD height="20" width="10" bgcolor="#ffffff">&nbsp;</TD><TD height="20" width="10" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD colspan="2" valign="top" align="left" height="20" width="20" bgcolor="#336699"><IMG src="images/tl_navcorner_20.gif" alt="" border="0"></TD><TD align="center" height="20" width="130" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Web Services</B></FONT></TD><TD colspan="2" valign="top" align="right" height="20" width="20" bgcolor="#336699"><IMG src="images/tr_navcorner_20.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD valign="middle" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/a_nav_6699cc.gif" name="N800004" alt="" border="0"></TD><TD colspan="3" width="150" bgcolor="#e3e3e3"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><A href="#Restaurant"  style="text-decoration: none">Restaurant Booking Service</A></FONT></TD><TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="middle" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/a_nav_6699cc.gif" name="N800004" alt="" border="0"></TD><TD colspan="3" width="150" bgcolor="#e3e3e3"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><A href="#Theatre"  style="text-decoration: none">Theatre Booking Service</A></FONT></TD><TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="middle" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/a_nav_6699cc.gif" name="N800004" alt="" border="0"></TD><TD colspan="3" width="150" bgcolor="#e3e3e3"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><A href="#Taxi"  style="text-decoration: none">Taxi Booking Service</A></FONT></TD><TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD colspan="2" valign="bottom" align="left" height="20" width="20" bgcolor="#e3e3e3"><IMG src="images/bl_navcorner_20.gif" alt="" border="0"></TD><TD height="20" width="130" bgcolor="#e3e3e3">&nbsp;</TD><TD colspan="2" valign="bottom" align="right" height="20" width="20" bgcolor="#e3e3e3"><IMG src="images/br_navcorner_20.gif" alt="" border="0"></TD>
+</TR>
+</table>
+
+<p></p>
+</TD><TD width="20">&nbsp;</TD><TD valign="top" width="530">
+
+<form method="GET" action="basicclient11">
+
+<% if(null != request.getAttribute("result")) { %>
+<!-- tx result panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Transaction Result</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<div>
+<p>
+<%= request.getAttribute("result") %>
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+<% } // end if %>
+
+
+<!-- transaction type selection panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Restaurant Service - Booking Form</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<div>
+<p>
+Transaction Type:
+<SELECT NAME="txType">
+<option value="AtomicTransaction">Atomic Transaction</option>
+<option value="BusinessActivity">Business Activity</option>
+</SELECT>
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+
+
+<!-- restaurant booking panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Restaurant Service - Booking Form</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<div>
+<p>
+Table for
+<SELECT NAME="restaurant">
+<OPTION>1
+<OPTION>2
+<OPTION>3
+<OPTION>4
+<OPTION>5
+<OPTION>6
+<OPTION>7
+<OPTION>8
+<OPTION>9
+<OPTION>10
+</SELECT>
+people.
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+
+<!-- theatre booking panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Theatre Service - Booking Form</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<div>
+<p>
+Book
+<SELECT NAME="theatrecount">
+<OPTION>1
+<OPTION>2
+<OPTION>3
+<OPTION>4
+<OPTION>5
+<OPTION>6
+<OPTION>7
+<OPTION>8
+<OPTION>9
+<OPTION>10
+</SELECT>
+seats in the
+<select name="theatrearea">
+<option value="0">Circle
+<option value="1">Stalls
+<option value="2">Balcony
+</select>
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+
+<!-- taxi booking panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Taxi Service - Booking Form</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<div>
+<p>
+Book a taxi?
+<SELECT NAME="taxi">
+<option value="0">No</option>
+<option value="1">Yes</option>
+</SELECT>
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+
+<!-- submit / reset panel -->
+<TABLE width="530" cellpadding="0" cellspacing="0" border="0">
+<TR>
+<TD colspan="3" height="20" bgcolor="#ffffff">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="top" align="left" width="10" bgcolor="#336699"><IMG src="images/tl_corner_10.gif" alt="" border="0"></TD><TD valign="middle" align="left" width="510" bgcolor="#336699"><FONT size="2" color="#ffffff" style="font-family: Arial, Helvetica, sans-serif"><B>Booking Controls</B></FONT></TD><TD valign="top" align="right" width="10" bgcolor="#336699"><IMG src="images/tr_corner_10.gif" alt="" border="0"></TD>
+</TR>
+<TR>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD><TD width="510" bgcolor="#e3e3e3">
+<FONT size="2" style="font-family: Arial, Helvetica, sans-serif">
+<p>
+<input type="submit" name="submit" value="Submit Booking Requests" />
+&nbsp;&nbsp;
+<input type="reset" name="reset" value="Reset Form Values" />
+</p>
+</FONT></TD>
+<TD width="10" bgcolor="#e3e3e3">&nbsp;</TD>
+</TR>
+<TR>
+<TD valign="bottom" align="left" width="10" bgcolor="#e3e3e3"><IMG src="images/bl_corner_10.gif" alt="" border="0"></TD><TD width="510" bgcolor="#e3e3e3">&nbsp;</TD><TD valign="bottom" align="right" width="10" bgcolor="#e3e3e3"><IMG src="images/br_corner_10.gif" alt="" border="0"></TD>
+</TR>
+</TABLE>
+
+</form>
+
+</table>
+
+</body>
+
+</html>
+

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml	2008-01-30 11:45:09 UTC (rev 18205)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/xts-build.xml	2008-01-30 15:35:08 UTC (rev 18206)
@@ -69,10 +69,13 @@
 
     <property name="build.dir" location="build"/>
     <property name="src.dir" location="src"/>
+    <property name="src11.dir" location="src11"/>
     <property name="web.dir" location="web"/>
+    <property name="build.web.dir" location="${build.dir}/web"/>
     <property name="dd.dir" location="dd"/>
     <property name="jboss.dd.dir" location="${dd.dir}/jboss"/>
     <property name="build.config" location="${build.dir}/config"/>
+    <property name="build.config11" location="${build.dir}/config11"/>
     <property name="build.soapconfig" location="${build.dir}/soapconfig"/>
     <property name="appinf.dir" location="${build.dir}/APP-INF"/>
     <property name="appinflib.dir" location="${appinf.dir}/lib"/>
@@ -102,6 +105,18 @@
         <filter token="urlstub" value="${urlstub}"/>
     </filterset>
 
+    <filterset id="webxml11.filter">
+        <filter token="restaurantATURL" value="${restaurantAT11URL}"/>
+        <filter token="restaurantBAURL" value="${restaurantBA11URL}"/>
+        <filter token="taxiATURL" value="${taxiAT11URL}"/>
+        <filter token="taxiBAURL" value="${taxiBA11URL}"/>
+        <filter token="theatreATURL" value="${theatreAT11URL}"/>
+        <filter token="theatreBAURL" value="${theatreBA11URL}"/>
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <filter token="urlstub" value="${urlstub}11"/>
+    </filterset>
+
     <target name="clean">
         <delete dir="${build.dir}"/>
         <delete>
@@ -126,7 +141,10 @@
     <target name="init" depends="init-properties">
         <mkdir dir="${build.dir}"/>
         <mkdir dir="${build.dir}/classes"/>
+        <mkdir dir="${build.dir}/classes11"/>
+        <mkdir dir="${build.dir}/classes11/classes"/>
         <mkdir dir="${build.config}"/>
+        <mkdir dir="${build.config11}"/>
         <mkdir dir="${build.soapconfig}"/>
         <mkdir dir="${appinf.dir}"/>
         <mkdir dir="${appinflib.dir}"/>
@@ -141,6 +159,22 @@
             <src path="${src.dir}"/>
             <patternset>
 	        <!-- client app -->
+		<include name="com/arjuna/xts/nightout/clients/jboss/**"/>
+	        <!-- server impl -->
+		<include name="com/arjuna/xts/nightout/services/**"/>
+            </patternset>
+        </javac>
+    </target>
+
+    <target name="compile11" depends="init">
+        <javac destdir="${build.dir}/classes11/classes" debug="${javac.debug}"
+            optimize="${javac.optimize}" deprecation="${javac.deprecation}" >
+            <classpath>
+                <path refid="compile.path"/>
+            </classpath>
+            <src path="${src11.dir}"/>
+            <patternset>
+	        <!-- client app -->
                 <include name="com/jboss/jbosstm/xts/demo/client/**"/>
 	        <!-- server impl -->
 		<include name="com/jboss/jbosstm/xts/demo/services/**"/>
@@ -157,37 +191,57 @@
         <filter token="hostname" value="${hostname}"/>
         <filter token="port" value="${port}"/>
         <copy todir="${build.config}" filtering="true">
-            <fileset dir="${conf.dir}" includes="wscf.xml wscf11.xml wstx.xml wstx11.xml wst.xml wst11.xml"/>
+            <fileset dir="${conf.dir}" includes="wscf.xml wstx.xml wst.xml"/>
 	</copy>
         <jar destfile="${build.dir}/config.jar" basedir="${build.config}"/>
     </target>
 
+    <target name="config11">
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <copy todir="${build.config11}" filtering="true">
+            <fileset dir="${conf.dir}" includes="wscf11.xml wstx11.xml wst11.xml"/>
+	</copy>
+        <jar destfile="${build.dir}/config11.jar" basedir="${build.config11}"/>
+    </target>
+
     <target name="jboss-webservices" depends="compile">
         <copy tofile="${build.dir}/classes/com/jboss/jbosstm/xts/demo/services/context-handlers.xml"
 	      file="${jboss.dd.dir}/context-handlers11.xml"/>
-<!--
-        <war destfile="${build.dir}/xts-demo-webservices.war" webxml="${jboss.dd.dir}/service-web-app.xml">
--->
-        <war destfile="${build.dir}/xts-demo-webservices.war"
+        <war destfile="${build.dir}/xts-demo-webservices.war"  webxml="${jboss.dd.dir}/service-web-app.xml">
+	    <!-- include app wsdl -->
+            <webinf dir="${jboss.dd.dir}" includes="webservices.xml wsdl/*.wsdl jaxrpc-mapping.xml"/>
+	        <!-- server impl -->
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/**/*"/>
+            <manifest>
+                <attribute name="Class-Path" value="/WEB-INF/classes ${lib.libs} ${ext.libs}"/>
+            </manifest>
+        </war>
+    </target>
+
+    <target name="jboss-webservices11" depends="compile11">
+        <copy tofile="${build.dir}/classes11/classes/com/jboss/jbosstm/xts/demo/services/context-handlers.xml"
+	      file="${jboss.dd.dir}/context-handlers11.xml"/>
+        <war destfile="${build.dir}/xts-demo-webservices11.war"
 	     needxmlfile="false">
-	    <!-- include app wsdl and wscoor wsdl -->
+	    <!-- include app wsdl -->
             <webinf dir="${jboss.dd.dir}" includes="wsdl/*.wsdl"/>
-            <webinf dir="${xts.home}/coordinator/dd" includes="wsdl/*.wsdl"/>
 	        <!-- server impl -->
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/services/**/*"/>
 	        <!-- generated server interfaces -->
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantServiceBA.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/theatre/ITheatreService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/theatre/ITheatreServiceBA.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/taxi/ITaxiService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/taxi/ITaxiServiceBA.class"/>
             <manifest>
                 <attribute name="Class-Path" value="/WEB-INF/classes ${lib.libs} ${ext.libs}"/>
@@ -202,34 +256,66 @@
         </copy>
 
         <war warfile="${build.dir}/xts-demo.war" webxml="${build.dir}/client-web-app.xml">
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/clients/jboss/**"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.class"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.class"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Theatre/ITheatreService.class"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.class"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Taxi/ITaxiService.class"/>
+	    <webinf dir="${build.dir}"
+		includes="classes/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.class"/>
+            <fileset dir="${web.dir}" excludes="index11.jsp"/>
+	    <webinf dir="${jboss.dd.dir}" includes="wsdl/**, client-jaxrpc-mapping.xml"/>
+            <manifest>
+                <attribute name="Class-Path" value="wstx.jar"/>
+            </manifest>
+        </war>
+    </target>
+
+    <target name="jboss-webapp11" depends="compile">
+        <copy tofile="${build.dir}/client-web-app11.xml" file="${jboss.dd.dir}/client-web-app11.xml">
+            <filterset refid="webxml11.filter"/>
+        </copy>
+
+	  <copy tofile="${build.web.dir}/index.jsp" file="${web.dir}/index11.jsp">
+            <filterset refid="webxml11.filter"/>
+	  </copy>
+        <war warfile="${build.dir}/xts-demo11.war" webxml="${build.dir}/client-web-app11.xml">
 	    <!-- include app wsdl and wscoor wsdl -->
             <webinf dir="${jboss.dd.dir}" includes="wsdl/*.wsdl"/>
-            <webinf dir="${xts.home}/coordinator/dd" includes="wsdl/*.wsdl"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/client/**"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantServiceBA.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/theatre/ITheatreService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/theatre/ITheatreServiceBA.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/taxi/ITaxiService.class"/>
-	    <webinf dir="${build.dir}"
+	    <webinf dir="${build.dir}/classes11"
 		includes="classes/com/jboss/jbosstm/xts/demo/taxi/ITaxiServiceBA.class"/>
-            <fileset dir="${web.dir}"/>
+            <fileset dir="${web.dir}" excludes="index.jsp index11.jsp"/>
+            <fileset dir="${build.web.dir}" includes="index.jsp"/>
             <manifest>
                 <attribute name="Class-Path" value="wstx.jar"/>
             </manifest>
         </war>
     </target>
 
-    <target name="jboss-ear" depends="jboss-webservices, jboss-webapp, config">
+    <!-- build ear containing xts demos for both 1.0 and 1.1 wscoor -->
+    <target name="jboss-ear" depends="jboss-webservices, jboss-webapp, config, jboss-webservices11, jboss-webapp11, config11">
         <ear earfile="${build.dir}/xts-demo.ear"
             appxml="${jboss.dd.dir}/application.xml">
-            <fileset dir="${build.dir}" includes="xts-demo-webservices.war xts-demo.war config.jar ws-t.war ws-c.war"/>
+            <fileset dir="${build.dir}" includes="xts-demo-webservices.war xts-demo.war config.jar xts-demo-webservices11.war xts-demo11.war config11.jar ws-t.war ws-c.war"/>
 	        <fileset dir="${xts.home}/lib" includes="*.jar"/>
 	        <fileset dir="${xts.home}/lib/ext" includes="${ext.package}"/>
 	        <fileset dir="${xts.home}/webapps" includes="*.war" excludes="ws-t.war ws-c.war"/>




More information about the jboss-svn-commits mailing list