[jboss-svn-commits] JBL Code SVN: r14867 - in labs/jbosstm/workspace: adinn and 30 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Sep 4 11:52:34 EDT 2007


Author: adinn
Date: 2007-09-04 11:52:34 -0400 (Tue, 04 Sep 2007)
New Revision: 14867

Added:
   labs/jbosstm/workspace/adinn/
   labs/jbosstm/workspace/adinn/cxfdemo/
   labs/jbosstm/workspace/adinn/cxfdemo/BUILDING
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MessageFactory
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MetaFactory
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.SOAPFactory
   labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.ws.spi.Provider
   labs/jbosstm/workspace/adinn/cxfdemo/README
   labs/jbosstm/workspace/adinn/cxfdemo/build-services.sh
   labs/jbosstm/workspace/adinn/cxfdemo/build.bat
   labs/jbosstm/workspace/adinn/cxfdemo/build.sh
   labs/jbosstm/workspace/adinn/cxfdemo/build.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/application.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/client-web-app.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/cxf-servlet.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/jaxws-handlers.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/service-web-app.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/web-app.xml
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceAT.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceBA.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceAT.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceBA.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceAT.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceBA.wsdl
   labs/jbosstm/workspace/adinn/cxfdemo/docs/
   labs/jbosstm/workspace/adinn/cxfdemo/docs/about.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/atomictransaction.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/businessactivity.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/deploying.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/arjuna_strapline.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/header_grid.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_email.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_printer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/menu_spacer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/search_bg.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/spacer.jpg
   labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/trans_spacer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/docs/includes/
   labs/jbosstm/workspace/adinn/cxfdemo/docs/includes/trailmap_navigation.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/index.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/installcontent.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/sourcecode.xml
   labs/jbosstm/workspace/adinn/cxfdemo/docs/styles.css
   labs/jbosstm/workspace/adinn/cxfdemo/docs/wherenext.xml
   labs/jbosstm/workspace/adinn/cxfdemo/html/
   labs/jbosstm/workspace/adinn/cxfdemo/html/about.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/atomictransaction.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/businessactivity.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/deploying.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/JBoss_DivOfRH_RGB.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/arjuna_strapline.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/header_grid.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_email.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_printer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/menu_spacer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/search_bg.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/spacer.jpg
   labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/trans_spacer.gif
   labs/jbosstm/workspace/adinn/cxfdemo/html/index.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/installcontent.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/sourcecode.html
   labs/jbosstm/workspace/adinn/cxfdemo/html/styles.css
   labs/jbosstm/workspace/adinn/cxfdemo/html/wherenext.html
   labs/jbosstm/workspace/adinn/cxfdemo/jboss.properties
   labs/jbosstm/workspace/adinn/cxfdemo/src/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java
   labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java
   labs/jbosstm/workspace/adinn/cxfdemo/web/
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/a_nav_6699cc.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/arjuna_logo.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_corner_10.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_navcorner_20.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_corner_10.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_navcorner_20.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_corner_10.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_navcorner_20.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_corner_10.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_navcorner_20.gif
   labs/jbosstm/workspace/adinn/cxfdemo/web/index.jsp
   labs/jbosstm/workspace/adinn/cxfdemo/xsl/
   labs/jbosstm/workspace/adinn/cxfdemo/xsl/ATL_LookAndFeel.xsl
   labs/jbosstm/workspace/adinn/cxfdemo/xts-build.xml
Log:
version of XTS demo whic uses CXF for business service invocations

Added: labs/jbosstm/workspace/adinn/cxfdemo/BUILDING
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/BUILDING	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/BUILDING	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,32 @@
+#
+# JBoss, Home of Professional Open Source
+# Copyright 2007, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. 
+# See the copyright.txt in the distribution for a full listing 
+# of individual contributors.
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU 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-2007,
+# @author JBoss Inc.
+#
+
+This demo has been written for, and tested on, JBoss4.2.1_GA and CXF
+Incubator 2.0. Please download and install this app server from the
+JBoss website and this CXF release from the Apache incubator site.
+
+Follow these steps to build the demo for JBoss
+ - define CXF_HOME JBOSS_HOME and XTS_HOME as described in ../README
+ - add java and ant to your path
+ - execute 'sh build.sh jboss clean build' on unix or
+   'build.bat jboss clean build deploy'
+
+Open a browser and enter the xts-demo url (e.g. http://localhost:8080/xts-demo)

Added: labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MessageFactory
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MessageFactory	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MessageFactory	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1 @@
+com.sun.xml.messaging.saaj.soap.DynamicMessageFactoryImpl
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MetaFactory
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MetaFactory	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.MetaFactory	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1 @@
+com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.SOAPFactory
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.SOAPFactory	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.soap.SOAPFactory	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1 @@
+com.sun.xml.messaging.saaj.soap.SOAPFactoryImpl
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.ws.spi.Provider
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.ws.spi.Provider	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/META-INF/services/javax.xml.ws.spi.Provider	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1 @@
+org.apache.cxf.jaxws.spi.ProviderImpl
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/cxfdemo/README
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/README	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/README	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,68 @@
+This is a rebuild of the standard JBoss XTS demo. The server
+components of the demo employ generic JaxWS APIs/Annotations and WSDL
+definitions to define a web service. The service is implemented over
+Apache CXF Incubator 2.0 using the standard cxf servlet.
+
+The web service client component of the demo is implemented as a
+separate web service over an HTTP servlet and can be accesed via a
+form interface. It uses generic JaxWS APIs to locate and invoke the
+CXF based services.
+
+SOAP handlers are registered with the cxf client and services, again
+using generic JaxWS APIs. The handlers ensure that a web transaction
+context flows to and fro between the client and the server, allowing
+the operations performed on both sides of the business communication
+to execute in a single shared transaction.
+
+This demo has been built to run using JBoss AS 4.2.3 and Apache CXF
+Incubator 2.0. These releases employ incompatible versions of several
+libraries so the installed JBoss AS release needs to be patched before
+installing the demo by replacing various libraries located in the
+JBOSS server lib and deploy drectories. It is assumed that the JBoss
+AS release is installed in a directory identified by environment
+variable JBOSS_HOME and that the CXF release is installedin a
+directory identified by environment variable CXF_HOME. The
+instructions apply for the default server. If a diferent server is
+required substitute the appropriate name for "default" in the paths
+provided below
+
+  rm $JBOSS_HOME/server/default/lib/activation.jar
+  rm $JBOSS_HOME/server/default/lib/jboss-saaj.jar
+
+  cp $CXF_HOME/lib/geronimo-activation_1.1_spec-1.0-M1.jar \
+           $JBOSS_HOME/server/default/lib/
+  cp $CXF_HOME/lib/saaj-api-1.3.jar $JBOSS_HOME/server/default/lib/
+  cp $CXF_HOME/lib/saaj-impl-1.3.jar $JBOSS_HOME/server/default/lib/
+
+  rm $JBOSS_HOME/server/default/deploy/jbossws.sar/jboss-jaxws.jar
+  rm $JBOSS_HOME/server/default/deploy/jbossws.sar/stax-api.jar
+  rm $JBOSS_HOME/server/default/deploy/jbossws.sar/jaxb-api.jar
+  rm $JBOSS_HOME/server/default/deploy/jbossws.sar/jaxb-impl.jar
+  rm $JBOSS_HOME/server/default/deploy/jbossws.sar/jboss-jaxws.jar
+
+  cp $CXF_HOME/lib/geronimo-ws-metadata_2.0_spec-1.1.1.jar \
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+  cp $CXF_HOME/lib/jaxb-api-2.0.jar \
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+  cp $CXF_HOME/lib/jaxb-impl-2.0.5.jar\
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+  cp $CXF_HOME/lib/jaxws-api-2.0.jar \
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+  cp $CXF_HOME/lib/stax-api-1.0.1.jar\
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+  cp $CXF_HOME/lib/wstx-asl-3.2.1.jar \
+           $JBOSS_HOME/server/default/deploy/jbossws.sar/
+
+In order to build the demo you need to define the environment
+variables JBOSS_HOME, CXF_HOME as above. A third variable XTS_HOME
+should point to the directory to which the XTS code was installed by
+the JBossTS XTS build script (by default this is located under the
+JBossTs svn source tree in directory <svnroot>/XTS/xts-install).
+Execute "ant" in this directory to install the demo code into
+$XTS_HOME/demo. Then cd to the installed demo directory and execute
+"ant build" to build the demo code and "ant deploy" to deploy it to
+the JBoss app server installed in $JBOSS_HOME.
+
+You can access the demo client form by pointing your favourite browser at
+
+  http://<host>:<port>/xts-demo/

Added: labs/jbosstm/workspace/adinn/cxfdemo/build-services.sh
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/build-services.sh	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/build-services.sh	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,64 @@
+##!/bin/bash
+#
+# JBoss, Home of Professional Open Source
+# Copyright 2007, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. 
+# See the copyright.txt in the distribution for a full listing 
+# of individual contributors.
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU 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) 2007
+# @author JBoss Inc.
+#
+###############################################################################
+# usage: build-services.sh
+#
+# script which uses cxf tool wsdl2java to to generate server and
+# client interfaces and dumy implementations from wsdl files.
+# generated files are placed in directory services. if it alreayd
+# exists you get a cance to say no (actually anythign but y or Y)
+# before it is overwritten.
+
+if [ -d services ] ; then
+    echo -n "really overwrite directory services? (y/n) "
+    read ans
+    if [ "$ans" != "y" -a "$ans" != "Y" ]; then
+	exit 1
+    else
+	echo "ok, here we go . . ."
+	rm -rf services
+    fi
+elif [ -f services ] ; then
+    echo -n "really overwrite file services? (y/n) "
+    read ans
+    if [ "$ans" != "y" -a "$ans" != "Y" ]; then
+	exit 1
+    else
+	echo "ok, here we go . . ."
+	rm -rf services
+    fi
+
+fi
+
+mkdir services
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Theatre=com.arjuna.xts.nightout.services.Theatre -impl dd/jboss/wsdl/TheatreServiceAT.wsdl
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Theatre=com.arjuna.xts.nightout.services.Theatre -impl dd/jboss/wsdl/TheatreServiceBA.wsdl
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Restaurant=com.arjuna.xts.nightout.services.Restaurant -impl dd/jboss/wsdl/RestaurantServiceAT.wsdl
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Restaurant=com.arjuna.xts.nightout.services.Restaurant -impl dd/jboss/wsdl/RestaurantServiceBA.wsdl
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Taxi=com.arjuna.xts.nightout.services.Taxi -impl dd/jboss/wsdl/TaxiServiceAT.wsdl
+
+wsdl2java -verbose -d services -p http://www.jboss.com/jbosstm/xts/demo/Taxi=com.arjuna.xts.nightout.services.Taxi -impl dd/jboss/wsdl/TaxiServiceBA.wsdl

Added: labs/jbosstm/workspace/adinn/cxfdemo/build.bat
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/build.bat	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/build.bat	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,45 @@
+rem
+rem JBoss, Home of Professional Open Source
+rem Copyright 2007, Red Hat Middleware LLC, and individual contributors
+rem as indicated by the @author tags. 
+rem See the copyright.txt in the distribution for a full listing 
+rem of individual contributors.
+rem This copyrighted material is made available to anyone wishing to use,
+rem modify, copy, or redistribute it subject to the terms and conditions
+rem of the GNU General Public License, v. 2.0.
+rem This program is distributed in the hope that it will be useful, but WITHOUT A 
+rem WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+rem PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+rem You should have received a copy of the GNU General Public License,
+rem v. 2.0 along with this distribution; if not, write to the Free Software
+rem Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+rem MA  02110-1301, USA.
+rem 
+rem (C) 2005-2007,
+rem @author JBoss Inc.
+rem
+ at echo off
+rem ###########################################################################
+rem # Wrapper script for building and deploying xts-demo                      #
+rem # Usage: build.bat [weblogic|jboss] <target>                              #
+rem ###########################################################################
+
+if "%OS" == "Windows_NT" @setlocal
+
+set PROGRAM=build.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0
+
+if "%1" == "" goto USAGE
+
+set PROPERTYFILE=%1.properties
+if exist "%PROPERTYFILE%" goto RUN
+
+:USAGE
+echo Usage: %PROGRAM% [weblogic|jboss|webmethods] <target>
+goto END
+
+:RUN
+shift
+ant -Dxmlpropertyfile="%PROPERTYFILE%" %1 %2 %3 %4 %5 %6 %7 %8 %9
+:END
+if "%OS" == "Windows_NT" @endlocal

Added: labs/jbosstm/workspace/adinn/cxfdemo/build.sh
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/build.sh	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/build.sh	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,38 @@
+#
+# JBoss, Home of Professional Open Source
+# Copyright 2007, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. 
+# See the copyright.txt in the distribution for a full listing 
+# of individual contributors.
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU 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-2007,
+# @author JBoss Inc.
+#
+#!/bin/sh
+###############################################################################
+# Wrapper script for building and deploying xts-demo                          #
+# Usage: build.sh [weblogic|jboss] <target>                                   #
+###############################################################################
+
+if [ $# -ge 1 ]
+then
+  propertyfile=$1.properties
+  if [ -f "$propertyfile" ]
+  then
+    shift
+    exec ant -Dxmlpropertyfile $propertyfile "$@"
+  fi
+fi
+
+echo "Usage: `basename $0` [weblogic|jboss|webmethods] <target>"
+exit 1


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/build.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/build.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/build.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,162 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a full listing
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @author JBoss Inc.
+-->
+
+<!-- $Id:$ -->
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--           Copyright (c) 2003, Arjuna Technologies Limited.             -->
+<!--                                                                        -->
+<!--                 WS-Transaction / XTS demo application                  -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+
+<project name="xts-cxfdemo" default="distribution" basedir=".">
+
+    <!-- ================================================================== -->
+
+    <!-- A JBoss build will always be generated                             -->
+
+    <!-- The properties to override are the following:                      -->
+    <!--    hostname (defaults to localhost)                                -->
+    <!--    port (defaults to 8080)                                         -->
+    <!--    urlstub (defaults to xtsdemowebservices)                        -->
+
+    <!--    deploy.dir The deployment directory for the ear                 -->
+    <!-- ================================================================== -->
+
+    <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+    <property name="cxf.home" value="${env.CXF_HOME}"/>
+    <property name="xtsinstalled.home" value="${env.XTS_HOME}"/>
+    <property name="distrib.dir" location="demo"/>
+    <property name="conf.dir" location="${xtsinstalled.home}/conf"/>
+
+    <property name="lib.dir" location="${xtsinstalled.home}/lib"/>
+    <property name="ext.dir" location="${lib.dir}/ext"/>
+    <property name="cxf.dir" location="${cxf.home}/lib"/>
+
+    <property name="lib.libs" value="wstx.jar ws-t.jar ws-c.jar"/>
+    <property name="ext.libs" value="jbossjta.jar"/>
+    <property name="cxf.libs" value="cxf-manifest-incubator.jar"/>
+    <property name="ext.compile" value="${ext.libs} jaxrpc.jar servlet.jar"/>
+    <property name= "cxf.compile" value="${cxf.libs}"/>
+
+    <!-- ================================================================== -->
+
+    <property name="build.dir" location="build"/>
+    <property name="src.dir" location="src"/>
+    <property name="web.dir" location="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.soapconfig" location="${build.dir}/soapconfig"/>
+    <property name="appinf.dir" location="${build.dir}/APP-INF"/>
+    <property name="appinflib.dir" location="${appinf.dir}/lib"/>
+
+    <property name="docs.dir" location="docs"/>
+    <property name="xsl.dir"  location="xsl"/>
+    <property name="html.dir" location="html"/>
+    <property name="xsl.file" value="ATL_LookAndFeel.xsl"/>
+
+    <property name="javac.debug"        value="on"/>
+    <property name="javac.optimize"     value="off"/>
+    <property name="javac.deprecation"  value="on"/>
+
+    <path id="lib.path">
+        <fileset dir="${lib.dir}" includes="${lib.libs}"/>
+    </path>
+    <path id="ext.path">
+        <fileset dir="${ext.dir}" includes="${ext.compile}"/>
+    </path>
+    <path id="cxf.path">
+        <fileset dir="${cxf.dir}" includes="${cxf.compile}"/>
+    </path>
+
+    <filterset id="webxml.filter">
+        <filter token="restaurantATURL" value="${restaurantATURL}"/>
+        <filter token="restaurantBAURL" value="${restaurantBAURL}"/>
+        <filter token="taxiATURL" value="${taxiATURL}"/>
+        <filter token="taxiBAURL" value="${taxiBAURL}"/>
+        <filter token="theatreATURL" value="${theatreATURL}"/>
+        <filter token="theatreBAURL" value="${theatreBAURL}"/>
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <filter token="urlstub" value="${urlstub}"/>
+    </filterset>
+
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+        <delete dir="${html.dir}"/>
+        <delete>
+            <fileset dir="." includes="**/*.bak" defaultexcludes="no"/>
+            <fileset dir="." includes="**/*~"    defaultexcludes="no"/>
+            <fileset dir="." includes="**/#*#"   defaultexcludes="no"/>
+            <fileset dir="." includes="**/.#*"   defaultexcludes="no"/>
+        </delete>
+    </target>
+
+    <target name="init-properties">
+        <property name="hostname" value="localhost"/>
+        <property name="port" value="8080"/>
+        <property name="urlstub" value="xtsdemowebservices"/>
+        <path id="compile.path">
+            <path refid="lib.path"/>
+            <path refid="ext.path"/>
+        </path>
+    </target>
+
+    <target name="init" depends="init-properties"/>
+
+    <target name="docs" depends="init">
+        <copy todir="${html.dir}">
+            <fileset dir="${docs.dir}">
+                <include name="**/*.css"/>
+                <include name="**/*.gif"/>
+                <include name="**/*.jpg"/>
+            </fileset>
+        </copy>
+        <style processor="trax" style="${xsl.dir}/${xsl.file}" basedir="${docs.dir}" includes="*.xml" destdir="${html.dir}" extension=".html">
+            <param name="rootpath" expression="."/>
+        </style>
+    </target>
+
+    <!-- prepare the demo app for customer release -->
+    <target name="distribution" depends="clean, docs">
+
+        <!-- copy everything (CVS dirs are auto-ignored) -->
+        <copy todir="${distrib.dir}">
+            <fileset dir=".">
+                <include name="src/**"/>
+                <include name="html/**"/>
+                <include name="dd/**"/>
+                <include name="web/**"/>
+                <include name="META-INF/**"/>
+                <include name="*.properties"/>
+                <include name="build.sh"/>
+                <include name="build.bat"/>
+                <include name="BUILDING"/>
+            </fileset>
+        </copy>
+        <!-- remove our dirty laundry -->
+        <copy file="xts-build.xml" tofile="${distrib.dir}/build.xml"/>
+    </target>
+
+</project>


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/build.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/application.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/application.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/application.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,73 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @author JBoss Inc.
+-->
+
+<!-- $Id:$-->
+
+<!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-t.war</web-uri>
+            <context-root>/ws-t</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>wscf.war</web-uri>
+            <context-root>/wscf</context-root>
+        </web>
+    </module>
+
+    <module>
+        <web>
+            <web-uri>wstx.war</web-uri>
+            <context-root>/wstx</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>
+
+</application>


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/application.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/client-web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/client-web-app.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/client-web-app.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,62 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Basic Client Servlet</servlet-name>
+        <url-pattern>/basicclient</url-pattern>
+    </servlet-mapping>
+</web-app>

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/cxf-servlet.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/cxf-servlet.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/cxf-servlet.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @author JBoss Inc.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xmlns:jaxws="http://cxf.apache.org/jaxws"
+     xmlns:soap="http://cxf.apache.org/bindings/soap"
+     xmlns:theatre="http://www.jboss.com/jbosstm/xts/demo/Theatre"
+     xmlns:restaurant="http://www.jboss.com/jbosstm/xts/demo/Restaurant"
+     xmlns:taxi="http://www.jboss.com/jbosstm/xts/demo/Taxi"
+     xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_theatreat"
+        implementor="com.arjuna.xts.nightout.services.Theatre.TheatreServiceAT"
+        wsdlLocation="WEB-INF/wsdl/TheatreServiceAT.wsdl"
+        serviceName="theatre:ITheatreServiceService"
+        endpointName="theatre:TheatreServiceAT"
+        address="/TheatreServiceAT">
+    </jaxws:endpoint>
+
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_theatreba"
+        implementor="com.arjuna.xts.nightout.services.Theatre.TheatreServiceBA"
+        wsdlLocation="WEB-INF/wsdl/TheatreServiceBA.wsdl"
+        serviceName="theatre:ITheatreServiceBAService"
+        endpointName="theatre:TheatreServiceBA"
+        address="/TheatreServiceBA">
+    </jaxws:endpoint>
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_restaurantat"
+        implementor="com.arjuna.xts.nightout.services.Restaurant.RestaurantServiceAT"
+        wsdlLocation="WEB-INF/wsdl/RestaurantServiceAT.wsdl"
+        serviceName="restaurant:IRestaurantServiceService"
+        endpointName="restaurant:RestaurantServiceAT"
+        address="/RestaurantServiceAT">
+    </jaxws:endpoint>
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_restaurantba"
+        implementor="com.arjuna.xts.nightout.services.Restaurant.RestaurantServiceBA"
+        wsdlLocation="WEB-INF/wsdl/RestaurantServiceBA.wsdl"
+        serviceName="restaurant:IRestaurantServiceBAService"
+        endpointName="restaurant:RestaurantServiceBA"
+        address="/RestaurantServiceBA">
+    </jaxws:endpoint>
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_taxiat"
+        implementor="com.arjuna.xts.nightout.services.Taxi.TaxiServiceAT"
+        wsdlLocation="WEB-INF/wsdl/TaxiServiceAT.wsdl"
+        serviceName="taxi:ITaxiServiceService"
+        endpointName="taxi:TaxiServiceAT"
+        address="/TaxiServiceAT">
+    </jaxws:endpoint>
+
+    <jaxws:endpoint
+        id="nightout_xml_bare_taxiba"
+        implementor="com.arjuna.xts.nightout.services.Taxi.TaxiServiceBA"
+        wsdlLocation="WEB-INF/wsdl/TaxiServiceBA.wsdl"
+        serviceName="taxi:ITaxiServiceBAService"
+        endpointName="taxi:TaxiServiceBA"
+        address="/TaxiServiceBA">
+    </jaxws:endpoint>
+
+</beans>

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/jaxws-handlers.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/jaxws-handlers.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/jaxws-handlers.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @author JBoss Inc.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" 
+		xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+		xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+	<handler>
+		<handler-name>JaxWSHeaderContextProcessor</handler-name>
+		<handler-class>com.arjuna.mw.wst.service.JaxWSHeaderContextProcessor</handler-class>
+	</handler>
+    </handler-chain>
+</handler-chains>

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/service-web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/service-web-app.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/service-web-app.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,75 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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/cxfdemo/dd/jboss/web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/web-app.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/web-app.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+    <display-name>cxf</display-name>
+    <description>cxf</description>
+    <servlet>
+        <servlet-name>cxf</servlet-name>
+        <display-name>cxf</display-name>
+        <description>Apache CXF Endpoint</description>
+        <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>cxf</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+    <session-config>
+        <session-timeout>60</session-timeout>
+    </session-config>
+</web-app>

Added: labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceAT.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,79 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="in0" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="bookSeatsResponse">
+
+   </wsdl:message>
+
+   <wsdl:portType name="IRestaurantService">
+
+      <wsdl:operation name="bookSeats" parameterOrder="in0">
+
+         <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="IRestaurantServiceService">
+
+      <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/cxfdemo/dd/jboss/wsdl/RestaurantServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/RestaurantServiceBA.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,81 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="in0" 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="in0">
+
+         <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="IRestaurantServiceBAService">
+
+      <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/cxfdemo/dd/jboss/wsdl/TaxiServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceAT.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,77 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="ITaxiServiceService">
+
+      <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/cxfdemo/dd/jboss/wsdl/TaxiServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TaxiServiceBA.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,79 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="bookTaxiBARequest" message="intf:bookTaxiBARequest"/>
+
+         <wsdl:output name="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="ITaxiServiceBAService">
+
+      <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/cxfdemo/dd/jboss/wsdl/TheatreServiceAT.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceAT.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceAT.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,80 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="in0" type="xsd:int"/>
+
+      <wsdl:part name="in1" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITheatreService">
+
+      <wsdl:operation name="bookSeats" parameterOrder="in0 in1">
+
+         <wsdl:input name="bookSeatsRequest" message="intf:bookSeatsRequest"/>
+
+         <wsdl:output name="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="ITheatreServiceService">
+
+      <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/cxfdemo/dd/jboss/wsdl/TheatreServiceBA.wsdl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceBA.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/dd/jboss/wsdl/TheatreServiceBA.wsdl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,83 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @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="in0" type="xsd:int"/>
+
+      <wsdl:part name="in1" type="xsd:int"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="ITheatreServiceBA">
+
+      <wsdl:operation name="bookSeats" parameterOrder="in0 in1">
+
+         <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="ITheatreServiceBAService">
+
+      <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/cxfdemo/docs/about.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/about.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/about.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,61 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: About the sample application" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: About the sample application
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="installcontent.html">Previous</link>
+                <link ref="deploying.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="About the sample application">
+            <html>
+                <p>
+                    The sample application features some simple transactional Web services, a client application, deployment metadata files and a build script.
+                    The application is designed to introduce some of the key features of the XML Transaction component of JBossTS 4.2.2 and help you get started with writing your own transactional Web services applications.
+                </p>
+                <p>
+                    The application is based around a simple booking scenario. The services provide the ability to transactionally reserve resources,
+                    whilst the client provides an interface to select the nature and quantity of the reservations.
+                    The chosen application domain is services for a night out.
+                </p>
+                <p>
+                    The server components consist of three Web services (Restaurant, Theatre, Taxi) which offer transactional booking services.
+                    These services each expose a GUI with state information and an event trace log.
+                </p>
+                <p>
+                    The client side of the application is a servlet which allows the user to select the required reservations and then books a night out by making invocations on each of the services within the scope of a Web Services transaction.
+                </p>
+                <p>
+                    Full source code for the services and the client is included, along with an ant script for building and deploying the code.
+                    The following step of this trail map will show you how to deploy and run the application.
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/atomictransaction.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/atomictransaction.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/atomictransaction.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,57 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: Atomic Transactions" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Atomic Transactions
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="deploying.html">Previous</link>
+                <link ref="businessactivity.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Atomic Transactions">
+            <html>
+                <p>
+                    Atomic transactions are the classical transaction type found in most enterprise data systems, such as relational databases.
+                    Atomic transactions typically exhibit ACID properties (Atomic, Consistent, Isolated and Durable).
+                    This is usually achieved by the transactions holding locks on data, particularly during transaction resolution through the two phase commit protocol (2PC).
+                    In J2EE applications, such transactions are normally managed through the JTA interface, or implicitly by the application container in the case of e.g. certain EJB configurations.
+                    Because of their lock based nature, atomic transactions are best suited to short lived operations within the enterprise.
+                </p>
+                <p>
+                    Long lived transactions can exhibit poor concurrency when holding locks for a prolonged period.
+                    For the same reason, use of lock based transactions for inter-enterprise integration is avoided due to the possibility of denial of service situations based on incorrect lock management.
+                    The next section of the trail map explains how these problems can be addressed through the use of an extended transaction model, Business Activities.
+                </p>
+                <p>
+                    To use the Atomic Transaction transaction type in the sample application, simply select it from the pull down menu at the top of the client interface.
+                    Notice that the server applications show the reservation resources (e.g. seats, tables) passing though a lifecycle involving the initial state (free), reserved (locked) and booked (committed).
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/businessactivity.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/businessactivity.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/businessactivity.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,59 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: Business Activities" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Business Activities
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="atomictransaction.html">Previous</link>
+                <link ref="sourcecode.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Business Activities">
+            <html>
+                <p>
+                    Business activities are an extended transaction model designed to support long running business processes.
+                    Unlike traditional atomic transactions, business activities typically use a compensation model to support the reversal of previously performed work in the event of transaction cancellation (rollback).
+                    This makes them more suitable for long duration processes and inter-enterprise coordination. However, it also requires the relaxation of traditional ACID properties, particularly isolation.
+                </p>
+                <p>
+                    The programming of business activities can involve more effort than is required for atomic transactions, as less infrastructure is typically available.
+                    For example, the XA support found in many enterprise databases handles the necessary locking, 2PC and other functions transparently, allowing databases to be used in atomic transactions with minimal programmer effort.
+                    However, equivalent support for business activities, particularly with regard to compensation logic, must be added to the code of each new application by the programmer.
+                </p>
+                <p>
+                    The demonstration application illustrates one possible approach to creating services for use in business activities. It shows how to create a transaction participant that can expose existing business logic, originally intended for use in atomic transactions, as a service suitable for use in a business activity.
+                    This is a particularly common scenario for enterprises seeking to reuse existing logic by packaging it for use as a component in the composition of workflow type processes. <!-- TODO -->
+                </p>
+                <p>
+                    To use the Business Activity transaction type in the sample application, simply select it from the pull down menu at the top of the client interface.
+                    Notice that the client applications show the reservation resources as booked (committed) even before the transaction is terminated, subsequently performing a compensating transaction to reverse this effect if the transaction is cancelled.
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/deploying.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/deploying.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/deploying.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -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.
+-->
+<page title="XML Transaction Service Demonstration Application: Deploying the sample application" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Deploying the sample application
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="about.html">Previous</link>
+                <link ref="atomictransaction.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Deploying the sample application">
+            <html>
+                <p>
+                    To run the demonstration application, you must compile the source code; bundle it, along with the required metadata files, into appropriate deployment constructs and then deploy these into the application container. This process is somewhat involved, but fortunately is completely automated by an ant build script.
+                </p>
+                <p>
+                    To proceed, you will need to install ant (<a class="linkscoloured" href="http://ant.apache.org/" target="_blank">http://ant.apache.org/</a>) to take advantage of the supplied build file. Version 1.6.1 or later of ant is recommended for this application. The application may not function correctly with versions prior to 1.5.
+                </p>
+                <p>
+					Deploying into JBoss.
+				</p>
+				<p>
+					This release has been tested against JBoss 4.0.3SP1, 4.0.4GA and 4.0.5GA.
+			    </p>
+                <ol>
+                    <li><p>Install JBoss.</p>
+                    </li>
+                    <li><p>Edit the <code>&lt;xts-home&gt;/demo/jboss.properties</code> file, replacing the <code>JBOSS_HOSTNAME</code>, <code>JBOSS_PORT</code>, <code>JBOSS_URLSTUB</code>, <code>JBOSS_DEPLOY_DIR</code> and <code>JBOSS_HOME</code> variables to reflect the location of your JBoss installation</p></li>
+                    <li><p>Compile the application source, build the application archive file and deploy it into JBoss deploy directory by typing '<code>build.sh jboss clean deploy</code>' on Unix or '<code>build.bat jboss clean deploy</code>' on Windows</p></li>
+                    <li><p>Run the application server by using the run.sh or run.bat command.</p></li>
+                    <li><p>Invoke the demo client by browsing the URL (e.g.): <code>http://hostname:port/xts-demo/</code></p></li>
+                </ol>
+                <p>
+					Deploying into webMethods.
+				</p>
+				<p>
+					This release has been tested against webMethods 5.0.2.
+			    </p>
+			    <p>
+					N.B. The classpath used to run webMethods must be modified so that the stax-api.1.0.jar contained within this distribution is encountered prior to all other webMethods jars.
+                </p>
+                <ol>
+                    <li><p>Install webMethods.</p>
+                    </li>
+                    <li><p>Edit the <code>&lt;xts-home&gt;/demo/webmethods.properties</code> file, replacing the <code>WEBMETHODS_HOSTNAME</code>, <code>WEBMETHODS_PORT</code>, <code>WEBMETHODS_URLSTUB</code>, <code>WEBMETHODS_DEPLOY_DIR</code> and <code>WEBMETHODS_HOME</code> variables to reflect the location of your webMethods installation</p></li>
+                    <li><p>Compile the application source, build the application archive file and deploy it into webMethods deploy directory by typing '<code>build.sh webmethods clean deploy</code>' on Unix or '<code>build.bat webmethods clean deploy</code>' on Windows</p></li>
+                    <li><p>Run the application from the deploy directory by using the webMethods runapp command.</p></li>
+                    <li><p>Invoke the demo client by browsing the URL (e.g.): <code>http://hostname:port/xts-demo/</code></p></li>
+                </ol>
+                <p>
+                This release of the demo application includes the ability to run the client against a mixture of backend webservices. The property files contain the URLs of the webservices, which can be changed to exercise any combination and demonstrate a distributed transaction.
+                The services are started using the same mechanism as above. Each platform will be running its own copy of the webservices but the deployed client will access those services configured in the relevant property file.
+                </p>
+                <p>Using the application</p>
+                <ul>
+                    <li><p>When invoked, the client will attempt to begin a transaction, reserve theatre tickets, a restaurant table and a taxi according to the parameters you have selected, then commit the transaction. It will log each step of its activity to the console window. As the transaction proceeds, each of the Web Services will pop up a window of its own in which its state and activity log can be seen. Some events in the service code are also logged to the console.</p></li>
+                    <li><p>The three server applications support a manual transaction control mode which you can use to simulate transaction failures. Use the Change Mode button on the server GUIs. Notice that the client throws an exception if the transaction is rolled back. [ Note: The manual commit mode overrides the normal availability checks in the services, so overbooking may occur. ]</p></li>
+                    <li><p>The following pages explain the two transaction models available in the XML Transaction , Atomic Transactions and Business Activities. Reading the following pages will help you understand the events taking place within the sample application.</p></li>
+                </ul>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/arjuna_strapline.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/arjuna_strapline.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/header_grid.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/header_grid.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_email.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_email.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_printer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/icon_printer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/menu_spacer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/menu_spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/search_bg.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/search_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/spacer.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/spacer.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/trans_spacer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/docs/images/look_and_feel/trans_spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/includes/trailmap_navigation.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/includes/trailmap_navigation.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/includes/trailmap_navigation.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,31 @@
+<!--
+  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.
+-->
+
+<links title="Trail map">
+    <link ref="index.html">Introduction</link>
+    <link ref="installcontent.html">Installation Content</link>
+    <link ref="about.html">About the Sample Application</link>
+    <link ref="deploying.html">Deploying the Sample Application</link>
+    <link ref="atomictransaction.html">Atomic Transactions</link>
+    <link ref="businessactivity.html">Business Activities</link>
+    <link ref="sourcecode.html">Sample Application Source Code</link>
+    <link ref="wherenext.html">Where next?</link>
+</links>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/index.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/index.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/index.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,60 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: Introduction" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Introduction
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="installcontent.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Introduction">
+            <html>
+                <p>
+                    Welcome to the &quot;Night Out&quot; sample application for the XML Transaction component of JBossTS 4.2.2.
+                </p>
+                <p>
+                    This documentation will help you get started with using the JBossTS Web services transactioning product.
+                </p>
+                <p>
+                    This trail map is structured as follows:
+                    <ul>
+                        <li><a class="linkscoloured" href="installcontent.html">Installation Content</a>: Details the components which have been installed.</li>
+                        <li><a class="linkscoloured" href="about.html">About the Sample Application</a>: An explanatory overview of the sample application.</li>
+                        <li><a class="linkscoloured" href="deploying.html">Deploying the Sample Application</a>: Shows how to deploy and run the sample.</li>
+                        <li><a class="linkscoloured" href="atomictransaction.html">Atomic Transactions</a>: Overview and example for short lived ACID transactions style.</li>
+                        <li><a class="linkscoloured" href="businessactivity.html">Business Activities</a>: Extended transactions for long running business processes.</li>
+                        <li><a class="linkscoloured" href="sourcecode.html">Source code</a>: How the sample application is structured and built.</li>
+                        <li><a class="linkscoloured" href="wherenext.html">Where Next?</a>: Further reading and suggested next steps.</li>
+                    </ul>
+                </p>
+                <p>
+                    Use the links in the panel on the left to navigate the documentation. On the following pages, click the 'Home' link to return to this page.
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/installcontent.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/installcontent.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/installcontent.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,62 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: Installation Content" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Installation Content
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="about.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Installation Content">
+            <html>
+                <p>
+                    The installer should have installed the following directories under &lt;jbosst 4.2.2 install&gt;/wst directory:
+                    <ul>
+                        <p>conf: product configuration files.</p>
+                        <p>coordinator: an application independent version of the transaction coordinator.</p>
+                        <p>demo: a sample application and introductory documentation.</p>
+                        <p>docs: product manuals and API javadocs.</p>
+                        <p>lib: jar files for the JBossTS components and their 3rd party prerequisites.</p>
+                        <p>webapps: pre built J2EE web applications for the product components.</p>
+                    </ul>
+                </p>
+                <p>
+                    In addition, you will require a Web services platform on which to deploy and run the product.
+				    This release of the XML Transaction component of JBossTS 4.2.2 is designed to run within JBoss and webMethods.
+				</p>
+				<p>
+    				This release has been tested on JBoss 4.0.3SP1, 4.0.4GA, 4.0.5GA and webMethods 5.0.2.
+                </p>
+                <p>
+                    To compile, deploy and run the sample application we also recommend using java SDK 1.4.2 and Apache ant 1.6.1 or later.
+                    If you do not already have these, you can download them from <a class="linkscoloured" href="http://java.sun.com/">java website</a> and the <a class="linkscoloured" href="http://ant.apache.org/">ant website</a>.
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/sourcecode.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/sourcecode.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/sourcecode.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,112 @@
+<!--
+  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.
+-->
+<page title="XML Transaction Service Demonstration Application: Source code overview" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Source code overview
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="businessactivity.html">Previous</link>
+                <link ref="wherenext.html">Next</link>
+            </links>
+        </navigation>
+
+        <area title="Source code overview">
+            <html>
+                <p>
+                    You can begin experimenting with the XML Transaction component of JBoss 4.2.2 by editing the sample application source code, which is heavily commented to assist your understanding. The source code can be found in the &lt;jbossts 4.2.2 install&gt;/wst/demo/src directory.
+                </p>
+                <p>
+                    It is structured as follows:
+                </p>
+                <p>
+                    <ul>
+                        <li>
+                            <p>
+                                com/arjuna/xts/nightout/clients/
+                            </p>
+                            <ul>
+                                <li>
+                                    <p>
+                                        jboss/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                    <p>
+                                        This servlet uses the JBoss JAX-RPC implementation as the SOAP transport library.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        jboss/restaurant/* : JBoss JAX-RPC client interfaces for accessing the restaurant web services.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        jboss/taxi/* : JBoss JAX-RPC client interfaces for accessing the taxi web services.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        jboss/theatre/* : JBoss JAX-RPC client interfaces for accessing the theatre web services.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        weblogic/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                    <p>
+                                        This servlet uses the WebLogic JAX-RPC implementation as the SOAP transport library.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        weblogic/proxies/* : WebLogic JAX-RPC client side code for accessing the Web services. This is automatically generated code.
+                                    </p>
+                                </li>
+                                <li>
+                                    <p>
+                                        webmethods/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                </li>
+                            </ul>
+                        </li>
+                        <li>
+                            <p>
+                                com/arjuna/xts/nightout/services/[Restuarant|Taxi|Theatre]/
+                            </p>
+                            <ul>
+                                <li>
+                                    <p>Each of these three Web services has similar structure, featuring a *Manager.java class (the transactional business logic, knowing nothing of Web services),
+                                    a *View.java file (the GUI component, largely tool generated), and the files that expose the business logic as transactional Web services.
+                                    In the filenames, AT denotes Atomic Transaction, whilst BA is for Business Activities. The *Service.java file is the business interface, whilst the *Participant.java file has the transaction management code.
+                                    </p>
+                                </li>
+                            </ul>
+                        </li>
+                    </ul>
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/styles.css
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/styles.css	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/styles.css	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+A:hover {
+	COLOR: #2fa9ec; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
+}
+A {
+	COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
+}
+.menuheader {
+	FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.menuoptions {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #585858; LINE-HEIGHT: normal; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.bodytext {
+	FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.bodyheader {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.quotetext {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #253169; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.boldbodytext {
+	FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.linkscoloured {
+	FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #2fa9ec; FONT-FAMILY: Arial, Helvetica, sans-serif
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/docs/wherenext.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/docs/wherenext.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/docs/wherenext.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -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.
+-->
+<page title="XML Transaction Service Demonstration Application: Where next?" rootpath="../..">
+    <header>
+        XML Transaction Service Demonstration Application: Where next?
+    </header>
+    <content>
+        <navigation>
+            <links include="includes/trailmap_navigation.xml"/>
+            <links title="Navigation">
+                <link ref="index.html">Start Trailmap</link>
+                <link ref="sourcecode.html">Previous</link>
+            </links>
+        </navigation>
+
+        <area title="Where next?">
+            <html>
+                <p>
+                    For further information, please consult the XML Transaction component of JBossTS 4.2.2 product documentation set.
+                    <li><a class="linkscoloured" href="../../docs/Programmers Guide.pdf" target="_blank">Programmers Guide</a> (.pdf)</li>
+                </p>
+                <p>
+                    A collection of links to additional background reading material on Web services coordination and transactions is also avaialble on the JBossTS labs site:
+                    <a class="linkscoloured" href="http://labs.jboss.com/jbosstm" target="_blank">http://labs.jboss.com/jbosstm</a>
+                </p>
+                <p>
+
+                    Updates to the XML Transaction component of JBossTS, as well as additional sample material, are periodically made available via the product web site at
+                    <a class="linkscoloured" href="http://labs.jboss.com/jbosstm" target="_blank">http://labs.jboss.com/jbosstm</a>
+                    Please drop by from time to time to ensure you have the most comprehensive material available.
+                    You can also discuss the software with its authors and other users on our
+                    <a class="linkscoloured" href="http://www.jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=240">forum</a>.
+                </p>
+            </html>
+        </area>
+    </content>
+    <footer/>
+</page>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/about.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/about.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/about.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,201 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: About the sample application</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./installcontent.html">Previous</A>
+<BR>
+                
+<A href="./deploying.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">About the sample application<DIV class="bodytext">
+            
+                
+<p>
+                    The sample application features some simple transactional Web services, a client application, deployment metadata files and a build script.
+                    The application is designed to introduce some of the key features of the XML Transaction component of JBossTS 4.2.2 and help you get started with writing your own transactional Web services applications.
+                </p>
+                
+<p>
+                    The application is based around a simple booking scenario. The services provide the ability to transactionally reserve resources,
+                    whilst the client provides an interface to select the nature and quantity of the reservations.
+                    The chosen application domain is services for a night out.
+                </p>
+                
+<p>
+                    The server components consist of three Web services (Restaurant, Theatre, Taxi) which offer transactional booking services.
+                    These services each expose a GUI with state information and an event trace log.
+                </p>
+                
+<p>
+                    The client side of the application is a servlet which allows the user to select the required reservations and then books a night out by making invocations on each of the services within the scope of a Web Services transaction.
+                </p>
+                
+<p>
+                    Full source code for the services and the client is included, along with an ant script for building and deploying the code.
+                    The following step of this trail map will show you how to deploy and run the application.
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/atomictransaction.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/atomictransaction.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/atomictransaction.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Atomic Transactions</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./deploying.html">Previous</A>
+<BR>
+                
+<A href="./businessactivity.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Atomic Transactions<DIV class="bodytext">
+            
+                
+<p>
+                    Atomic transactions are the classical transaction type found in most enterprise data systems, such as relational databases.
+                    Atomic transactions typically exhibit ACID properties (Atomic, Consistent, Isolated and Durable).
+                    This is usually achieved by the transactions holding locks on data, particularly during transaction resolution through the two phase commit protocol (2PC).
+                    In J2EE applications, such transactions are normally managed through the JTA interface, or implicitly by the application container in the case of e.g. certain EJB configurations.
+                    Because of their lock based nature, atomic transactions are best suited to short lived operations within the enterprise.
+                </p>
+                
+<p>
+                    Long lived transactions can exhibit poor concurrency when holding locks for a prolonged period.
+                    For the same reason, use of lock based transactions for inter-enterprise integration is avoided due to the possibility of denial of service situations based on incorrect lock management.
+                    The next section of the trail map explains how these problems can be addressed through the use of an extended transaction model, Business Activities.
+                </p>
+                
+<p>
+                    To use the Atomic Transaction transaction type in the sample application, simply select it from the pull down menu at the top of the client interface.
+                    Notice that the server applications show the reservation resources (e.g. seats, tables) passing though a lifecycle involving the initial state (free), reserved (locked) and booked (committed).
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/businessactivity.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/businessactivity.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/businessactivity.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,198 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Business Activities</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./atomictransaction.html">Previous</A>
+<BR>
+                
+<A href="./sourcecode.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Business Activities<DIV class="bodytext">
+            
+                
+<p>
+                    Business activities are an extended transaction model designed to support long running business processes.
+                    Unlike traditional atomic transactions, business activities typically use a compensation model to support the reversal of previously performed work in the event of transaction cancellation (rollback).
+                    This makes them more suitable for long duration processes and inter-enterprise coordination. However, it also requires the relaxation of traditional ACID properties, particularly isolation.
+                </p>
+                
+<p>
+                    The programming of business activities can involve more effort than is required for atomic transactions, as less infrastructure is typically available.
+                    For example, the XA support found in many enterprise databases handles the necessary locking, 2PC and other functions transparently, allowing databases to be used in atomic transactions with minimal programmer effort.
+                    However, equivalent support for business activities, particularly with regard to compensation logic, must be added to the code of each new application by the programmer.
+                </p>
+                
+<p>
+                    The demonstration application illustrates one possible approach to creating services for use in business activities. It shows how to create a transaction participant that can expose existing business logic, originally intended for use in atomic transactions, as a service suitable for use in a business activity.
+                    This is a particularly common scenario for enterprises seeking to reuse existing logic by packaging it for use as a component in the composition of workflow type processes. <!-- TODO -->
+                </p>
+                
+<p>
+                    To use the Business Activity transaction type in the sample application, simply select it from the pull down menu at the top of the client interface.
+                    Notice that the client applications show the reservation resources as booked (committed) even before the transaction is terminated, subsequently performing a compensating transaction to reverse this effect if the transaction is cancelled.
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/deploying.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/deploying.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/deploying.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,279 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Deploying the sample application</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./about.html">Previous</A>
+<BR>
+                
+<A href="./atomictransaction.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Deploying the sample application<DIV class="bodytext">
+            
+                
+<p>
+                    To run the demonstration application, you must compile the source code; bundle it, along with the required metadata files, into appropriate deployment constructs and then deploy these into the application container. This process is somewhat involved, but fortunately is completely automated by an ant build script.
+                </p>
+                
+<p>
+                    To proceed, you will need to install ant (<a class="linkscoloured" href="http://ant.apache.org/" target="_blank">http://ant.apache.org/</a>) to take advantage of the supplied build file. Version 1.6.1 or later of ant is recommended for this application. The application may not function correctly with versions prior to 1.5.
+                </p>
+                
+<p>
+					Deploying into JBoss.
+				</p>
+				
+<p>
+					This release has been tested against JBoss 4.0.3SP1, 4.0.4GA and 4.0.5GA.
+			    </p>
+                
+<ol>
+                    
+<li>
+<p>Install JBoss.</p>
+                    
+</li>
+                    
+<li>
+<p>Edit the <code>&lt;xts-home&gt;/demo/jboss.properties</code> file, replacing the <code>JBOSS_HOSTNAME</code>, <code>JBOSS_PORT</code>, <code>JBOSS_URLSTUB</code>, <code>JBOSS_DEPLOY_DIR</code> and <code>JBOSS_HOME</code> variables to reflect the location of your JBoss installation</p>
+</li>
+                    
+<li>
+<p>Compile the application source, build the application archive file and deploy it into JBoss deploy directory by typing '<code>build.sh jboss clean deploy</code>' on Unix or '<code>build.bat jboss clean deploy</code>' on Windows</p>
+</li>
+                    
+<li>
+<p>Run the application server by using the run.sh or run.bat command.</p>
+</li>
+                    
+<li>
+<p>Invoke the demo client by browsing the URL (e.g.): <code>http://hostname:port/xts-demo/</code>
+</p>
+</li>
+                
+</ol>
+                
+<p>
+					Deploying into webMethods.
+				</p>
+				
+<p>
+					This release has been tested against webMethods 5.0.2.
+			    </p>
+			    
+<p>
+					N.B. The classpath used to run webMethods must be modified so that the stax-api.1.0.jar contained within this distribution is encountered prior to all other webMethods jars.
+                </p>
+                
+<ol>
+                    
+<li>
+<p>Install webMethods.</p>
+                    
+</li>
+                    
+<li>
+<p>Edit the <code>&lt;xts-home&gt;/demo/webmethods.properties</code> file, replacing the <code>WEBMETHODS_HOSTNAME</code>, <code>WEBMETHODS_PORT</code>, <code>WEBMETHODS_URLSTUB</code>, <code>WEBMETHODS_DEPLOY_DIR</code> and <code>WEBMETHODS_HOME</code> variables to reflect the location of your webMethods installation</p>
+</li>
+                    
+<li>
+<p>Compile the application source, build the application archive file and deploy it into webMethods deploy directory by typing '<code>build.sh webmethods clean deploy</code>' on Unix or '<code>build.bat webmethods clean deploy</code>' on Windows</p>
+</li>
+                    
+<li>
+<p>Run the application from the deploy directory by using the webMethods runapp command.</p>
+</li>
+                    
+<li>
+<p>Invoke the demo client by browsing the URL (e.g.): <code>http://hostname:port/xts-demo/</code>
+</p>
+</li>
+                
+</ol>
+                
+<p>
+                This release of the demo application includes the ability to run the client against a mixture of backend webservices. The property files contain the URLs of the webservices, which can be changed to exercise any combination and demonstrate a distributed transaction.
+                The services are started using the same mechanism as above. Each platform will be running its own copy of the webservices but the deployed client will access those services configured in the relevant property file.
+                </p>
+                
+<p>Using the application</p>
+                
+<ul>
+                    
+<li>
+<p>When invoked, the client will attempt to begin a transaction, reserve theatre tickets, a restaurant table and a taxi according to the parameters you have selected, then commit the transaction. It will log each step of its activity to the console window. As the transaction proceeds, each of the Web Services will pop up a window of its own in which its state and activity log can be seen. Some events in the service code are also logged to the console.</p>
+</li>
+                    
+<li>
+<p>The three server applications support a manual transaction control mode which you can use to simulate transaction failures. Use the Change Mode button on the server GUIs. Notice that the client throws an exception if the transaction is rolled back. [ Note: The manual commit mode overrides the normal availability checks in the services, so overbooking may occur. ]</p>
+</li>
+                    
+<li>
+<p>The following pages explain the two transaction models available in the XML Transaction , Atomic Transactions and Business Activities. Reading the following pages will help you understand the events taking place within the sample application.</p>
+</li>
+                
+</ul>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/JBoss_DivOfRH_RGB.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/JBoss_DivOfRH_RGB.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/arjuna_strapline.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/arjuna_strapline.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/header_grid.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/header_grid.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_email.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_email.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_printer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/icon_printer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/menu_spacer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/menu_spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/search_bg.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/search_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/spacer.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/spacer.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/trans_spacer.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/html/images/look_and_feel/trans_spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/index.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/index.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/index.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,211 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Introduction</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./installcontent.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Introduction<DIV class="bodytext">
+            
+                
+<p>
+                    Welcome to the "Night Out" sample application for the XML Transaction component of JBossTS 4.2.2.
+                </p>
+                
+<p>
+                    This documentation will help you get started with using the JBossTS Web services transactioning product.
+                </p>
+                
+<p>
+                    This trail map is structured as follows:
+                    <ul>
+                        
+<li>
+<a class="linkscoloured" href="installcontent.html">Installation Content</a>: Details the components which have been installed.</li>
+                        
+<li>
+<a class="linkscoloured" href="about.html">About the Sample Application</a>: An explanatory overview of the sample application.</li>
+                        
+<li>
+<a class="linkscoloured" href="deploying.html">Deploying the Sample Application</a>: Shows how to deploy and run the sample.</li>
+                        
+<li>
+<a class="linkscoloured" href="atomictransaction.html">Atomic Transactions</a>: Overview and example for short lived ACID transactions style.</li>
+                        
+<li>
+<a class="linkscoloured" href="businessactivity.html">Business Activities</a>: Extended transactions for long running business processes.</li>
+                        
+<li>
+<a class="linkscoloured" href="sourcecode.html">Source code</a>: How the sample application is structured and built.</li>
+                        
+<li>
+<a class="linkscoloured" href="wherenext.html">Where Next?</a>: Further reading and suggested next steps.</li>
+                    
+</ul>
+                
+</p>
+                
+<p>
+                    Use the links in the panel on the left to navigate the documentation. On the following pages, click the 'Home' link to return to this page.
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/installcontent.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/installcontent.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/installcontent.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,207 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Installation Content</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./about.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Installation Content<DIV class="bodytext">
+            
+                
+<p>
+                    The installer should have installed the following directories under &lt;jbosst 4.2.2 install&gt;/wst directory:
+                    <ul>
+                        
+<p>conf: product configuration files.</p>
+                        
+<p>coordinator: an application independent version of the transaction coordinator.</p>
+                        
+<p>demo: a sample application and introductory documentation.</p>
+                        
+<p>docs: product manuals and API javadocs.</p>
+                        
+<p>lib: jar files for the JBossTS components and their 3rd party prerequisites.</p>
+                        
+<p>webapps: pre built J2EE web applications for the product components.</p>
+                    
+</ul>
+                
+</p>
+                
+<p>
+                    In addition, you will require a Web services platform on which to deploy and run the product.
+				    This release of the XML Transaction component of JBossTS 4.2.2 is designed to run within JBoss and webMethods.
+				</p>
+				
+<p>
+    				This release has been tested on JBoss 4.0.3SP1, 4.0.4GA, 4.0.5GA and webMethods 5.0.2.
+                </p>
+                
+<p>
+                    To compile, deploy and run the sample application we also recommend using java SDK 1.4.2 and Apache ant 1.6.1 or later.
+                    If you do not already have these, you can download them from <a class="linkscoloured" href="http://java.sun.com/">java website</a> and the <a class="linkscoloured" href="http://ant.apache.org/">ant website</a>.
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/sourcecode.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/sourcecode.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/sourcecode.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,289 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Source code overview</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./businessactivity.html">Previous</A>
+<BR>
+                
+<A href="./wherenext.html">Next</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Source code overview<DIV class="bodytext">
+            
+                
+<p>
+                    You can begin experimenting with the XML Transaction component of JBoss 4.2.2 by editing the sample application source code, which is heavily commented to assist your understanding. The source code can be found in the &lt;jbossts 4.2.2 install&gt;/wst/demo/src directory.
+                </p>
+                
+<p>
+                    It is structured as follows:
+                </p>
+                
+<p>
+                    
+<ul>
+                        
+<li>
+                            
+<p>
+                                com/arjuna/xts/nightout/clients/
+                            </p>
+                            
+<ul>
+                                
+<li>
+                                    
+<p>
+                                        jboss/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                    
+<p>
+                                        This servlet uses the JBoss JAX-RPC implementation as the SOAP transport library.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        jboss/restaurant/* : JBoss JAX-RPC client interfaces for accessing the restaurant web services.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        jboss/taxi/* : JBoss JAX-RPC client interfaces for accessing the taxi web services.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        jboss/theatre/* : JBoss JAX-RPC client interfaces for accessing the theatre web services.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        weblogic/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                    
+<p>
+                                        This servlet uses the WebLogic JAX-RPC implementation as the SOAP transport library.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        weblogic/proxies/* : WebLogic JAX-RPC client side code for accessing the Web services. This is automatically generated code.
+                                    </p>
+                                
+</li>
+                                
+<li>
+                                    
+<p>
+                                        webmethods/BasicClient.java: A servlet that processes the form input and runs either an Atomic Transaction or Business Activity to make the bookings.
+                                    </p>
+                                
+</li>
+                            
+</ul>
+                        
+</li>
+                        
+<li>
+                            
+<p>
+                                com/arjuna/xts/nightout/services/[Restuarant|Taxi|Theatre]/
+                            </p>
+                            
+<ul>
+                                
+<li>
+                                    
+<p>Each of these three Web services has similar structure, featuring a *Manager.java class (the transactional business logic, knowing nothing of Web services),
+                                    a *View.java file (the GUI component, largely tool generated), and the files that expose the business logic as transactional Web services.
+                                    In the filenames, AT denotes Atomic Transaction, whilst BA is for Business Activities. The *Service.java file is the business interface, whilst the *Participant.java file has the transaction management code.
+                                    </p>
+                                
+</li>
+                            
+</ul>
+                        
+</li>
+                    
+</ul>
+                
+</p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/styles.css
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/styles.css	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/styles.css	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+A:hover {
+	COLOR: #2fa9ec; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
+}
+A {
+	COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
+}
+.menuheader {
+	FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.menuoptions {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #585858; LINE-HEIGHT: normal; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.bodytext {
+	FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.bodyheader {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.quotetext {
+	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #253169; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.boldbodytext {
+	FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #585858; FONT-FAMILY: Arial, Helvetica, sans-serif
+}
+.linkscoloured {
+	FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #2fa9ec; FONT-FAMILY: Arial, Helvetica, sans-serif
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/html/wherenext.html
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/html/wherenext.html	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/html/wherenext.html	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems">
+<META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service">
+<TITLE>XML Transaction Service Demonstration Application: Where next?</TITLE>
+<LINK href="./styles.css" rel="stylesheet" type="text/css">
+<SCRIPT type="text/javascript" language="JavaScript">
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&body=" + location.href;
+}
+                </SCRIPT>
+</HEAD>
+<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+    
+<TR>
+<TD width="494"><IMG src="./images/look_and_feel/JBoss_DivOfRH_RGB.gif" alt="arjuna logo" width="178" height="63"></TD><TD width="233"><IMG src="./images/look_and_feel/arjuna_strapline.gif" alt="arjuna strap line" width="233" height="63"></TD>
+</TR>
+    
+<TR>
+<TD colspan="2">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="172" valign="top">
+<FORM name="form1" method="post" action="">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+            
+<P class="menuheader">Trail map<DIV class="menuoptions">
+    
+<A href="./index.html">Introduction</A>
+<BR>
+    
+<A href="./installcontent.html">Installation Content</A>
+<BR>
+    
+<A href="./about.html">About the Sample Application</A>
+<BR>
+    
+<A href="./deploying.html">Deploying the Sample Application</A>
+<BR>
+    
+<A href="./atomictransaction.html">Atomic Transactions</A>
+<BR>
+    
+<A href="./businessactivity.html">Business Activities</A>
+<BR>
+    
+<A href="./sourcecode.html">Sample Application Source Code</A>
+<BR>
+    
+<A href="./wherenext.html">Where next?</A>
+<BR>
+
+</DIV>
+</P>
+            
+<P class="menuheader">Navigation<DIV class="menuoptions">
+                
+<A href="./index.html">Start Trailmap</A>
+<BR>
+                
+<A href="./sourcecode.html">Previous</A>
+<BR>
+            
+</DIV>
+</P>
+        
+</TD>
+</TR>
+<TR>
+<TD valign="top" background="./images/look_and_feel/search_bg.gif" bgcolor="#FFFFFF" class="bodytext">
+<BR>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+<TR>
+<TD width="15"><A href="javascript:printThisPage();"><IMG src="./images/look_and_feel/icon_printer.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:printThisPage();">print this page</A></TD>
+</TR>
+<TR>
+<TD width="15"><A href="javascript:emailThisPage();"><IMG src="./images/look_and_feel/icon_email.gif" width="15" height="14" border="0"></A></TD><TD class="bodytext"><A href="javascript:emailThisPage();">email this page</A></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD><TD width="6" height="214"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD><TD width="555" valign="top">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD width="537" valign="top">
+<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+<TR>
+<TD height="57">
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+<TR>
+<TD height="8" background="./images/look_and_feel/header_grid.gif" bgcolor="#FFFFFF"><IMG src="./images/look_and_feel/trans_spacer.gif" width="6" height="10"></TD>
+</TR>
+</TABLE>
+<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+<TR>
+<TD valign="top" bgcolor="#FFFFFF">
+<P class="menuheader">Where next?<DIV class="bodytext">
+            
+                
+<p>
+                    For further information, please consult the XML Transaction component of JBossTS 4.2.2 product documentation set.
+                    <li>
+<a class="linkscoloured" href="../../docs/Programmers Guide.pdf" target="_blank">Programmers Guide</a> (.pdf)</li>
+                
+</p>
+                
+<p>
+                    A collection of links to additional background reading material on Web services coordination and transactions is also avaialble on the JBossTS labs site:
+                    <a class="linkscoloured" href="http://labs.jboss.com/jbosstm" target="_blank">http://labs.jboss.com/jbosstm</a>
+                
+</p>
+                
+<p>
+
+                    Updates to the XML Transaction component of JBossTS, as well as additional sample material, are periodically made available via the product web site at
+                    <a class="linkscoloured" href="http://labs.jboss.com/jbosstm" target="_blank">http://labs.jboss.com/jbosstm</a>
+                    Please drop by from time to time to ensure you have the most comprehensive material available.
+                    You can also discuss the software with its authors and other users on our
+                    <a class="linkscoloured" href="http://www.jboss.com/index.html?module=bb&op=viewforum&f=240">forum</a>.
+                </p>
+            
+        
+</DIV>
+</P>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+<TR>
+<TD height="8" background="./images/look_and_feel/trans_spacer.gif" bgcolor="#FFFFFF"></TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+</TABLE>
+</TD>
+</TR>
+    
+<TR>
+<TD width="727" valign="top" align="right" colspan="3"><FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    All Rights Reserved.
+
+                    <br>
+<a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a><IMG src="./images/look_and_feel/spacer.jpg" alt="" border="0">
+
+                    +44 191 243 0676
+                </FONT></TD>
+</TR>
+
+</TABLE>
+</BODY>
+</HTML>

Added: labs/jbosstm/workspace/adinn/cxfdemo/jboss.properties
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/jboss.properties	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/jboss.properties	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,50 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU 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-2007,
+  @author JBoss Inc.
+-->
+<!-- JBoss property file
+  The following variables should be replaced for JBoss deployment
+  
+  JBOSS_HOSTNAME - the hostname of the JBoss installation (localhost)
+  JBOSS_PORT - the port of the JBoss web server (8080)
+  JBOSS_URLSTUB - the url stub for the demo webservices (xtsdemowebservices)
+  JBOSS_DEPLOY_DIR - the deploy directory of the JBoss instance ([JBOSS_HOME]/server/default/deploy)
+  
+  You can choose any combination of the URL entries provided that there is an entry for each service.
+  The default services are the ones running within JBoss.
+-->
+<arjuna>
+  <hostname>localhost</hostname>
+  <port>8080</port>
+  <urlstub>xtsdemowebservices</urlstub>
+  <!--
+  <deploy>
+    <dir>/home/adinn/jboss/jbossas/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy</dir>
+  </deploy>
+  -->
+
+
+  <!-- JBoss services -->
+  <restaurantATURL>http://localhost:8080/xtsdemowebservices/services/RestaurantServiceAT</restaurantATURL>
+  <restaurantBAURL>http://localhost:8080/xtsdemowebservices/services/RestaurantServiceBA</restaurantBAURL>
+  <taxiATURL>http://localhost:8080/xtsdemowebservices/services/TaxiServiceAT</taxiATURL>
+  <taxiBAURL>http://localhost:8080/xtsdemowebservices/services/TaxiServiceBA</taxiBAURL>
+  <theatreATURL>http://localhost:8080/xtsdemowebservices/services/TheatreServiceAT</theatreATURL>
+  <theatreBAURL>http://localhost:8080/xtsdemowebservices/services/TheatreServiceBA</theatreBAURL>
+</arjuna>

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/BasicClient.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,415 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+package com.arjuna.xts.nightout.clients.jboss;
+
+import java.io.IOException;
+
+import java.util.List;
+import java.util.LinkedList;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+
+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.Service;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.Handler;
+
+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;
+
+import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
+
+/**
+ * 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 QName RESTAURANT_SERVICE_AT = new QName("http://www.jboss.com/jbosstm/xts/demo/Restaurant", "IRestaurantServiceService") ;
+    /**
+     * The local context name for the BA Restaurant webservice.
+     */
+    private static final QName RESTAURANT_SERVICE_BA = new QName("http://www.jboss.com/jbosstm/xts/demo/Restaurant", "IRestaurantServiceBAService");
+    /**
+     * The local context name for the AT Theatre webservice.
+     */
+    private static final QName THEATRE_SERVICE_AT = new QName("http://www.jboss.com/jbosstm/xts/demo/Theatre", "ITheatreServiceService");
+    /**
+     * The local context name for the BA Theatre webservice.
+     */
+    private static final QName THEATRE_SERVICE_BA = new QName("http://www.jboss.com/jbosstm/xts/demo/Theatre", "ITheatreServiceBAService");
+    /**
+     * The local context name for the AT Taxi webservice.
+     */
+    private static final QName TAXI_SERVICE_AT = new QName("http://www.jboss.com/jbosstm/xts/demo/Taxi", "ITaxiServiceService");
+    /**
+     * The local context name for the BA Taxi webservice.
+     */
+    private static final QName TAXI_SERVICE_BA = new QName("http://www.jboss.com/jbosstm/xts/demo/Taxi", "ITaxiServiceBAService");
+    
+    /**
+     * 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") ;
+	*/
+
+        final String baseURL = "http://localhost:8080/xtsdemowebservices/services/";
+
+	restaurantATURL = baseURL + "RestaurantServiceAT" + "?wsdl";
+        restaurantBAURL = baseURL + "RestaurantServiceBA" + "?wsdl";
+        taxiATURL = baseURL + "TaxiServiceAT" + "?wsdl";
+        taxiBAURL = baseURL + "TaxiServiceBA" + "?wsdl";
+        theatreATURL = baseURL + "TheatreServiceAT" + "?wsdl";
+        theatreBAURL = baseURL + "TheatreServiceBA" + "?wsdl";
+
+        context = config.getServletContext();
+    }
+
+    /**
+     * Initialise if necessary
+     */
+    private synchronized void initialise()
+    throws ServletException
+    {
+        if (!initialised)
+        {
+            try
+            {
+                restaurantAT = (IRestaurantServiceAT)getProxy(RESTAURANT_SERVICE_AT, restaurantATURL, IRestaurantServiceAT.class) ;
+                restaurantBA = (IRestaurantServiceBA)getProxy(RESTAURANT_SERVICE_BA, restaurantBAURL, IRestaurantServiceBA.class) ;
+                taxiAT = (ITaxiServiceAT)getProxy(TAXI_SERVICE_AT, taxiATURL, ITaxiServiceAT.class) ;
+                taxiBA = (ITaxiServiceBA)getProxy(TAXI_SERVICE_BA, taxiBAURL, ITaxiServiceBA.class) ;
+                theatreAT = (ITheatreServiceAT)getProxy(THEATRE_SERVICE_AT, theatreATURL, ITheatreServiceAT.class) ;
+                theatreBA = (ITheatreServiceBA)getProxy(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 serviceName the fully qualified name of the service
+     * @param urlString The URL of the service as a String.
+     * @param portClass The port class type.
+     * @throws WebServiceException For errors creating proxy.
+     * @return The stub for the service endpoint.
+     */
+    private BindingProvider getProxy(final QName serviceName, final String urlString, final Class portClass)
+        throws WebServiceException, MalformedURLException
+    {
+	URL url = new URL(urlString);
+        Service service = Service.create(url, serviceName);
+        final BindingProvider port = (BindingProvider)service.getPort(portClass);
+	addClientHandler(port);
+        return port;
+    }
+
+    /**
+     * Add a client side JaxWS handler to a client port which will
+     * handle transaction context flow.
+     * @param port the client side port which needs to 
+     */
+    private void addClientHandler(BindingProvider port)
+    {
+	List<Handler> handlerChain = new LinkedList();
+	JaxWSHeaderContextProcessor handler = new JaxWSHeaderContextProcessor();
+	handlerChain.add(handler);
+
+	Binding binding = port.getBinding();
+	binding.setHandlerChain(handlerChain);
+    }
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.restaurant ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", name = "IRestaurantService")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface IRestaurantServiceAT
+{
+
+    /**
+     * Book a specified number of seats at the restaurant.
+     * @param numSeats The number of seats to book at the restaurant.
+     */
+    @javax.jws.WebMethod
+    public void bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	final int numSeats
+			  );
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/restaurant/IRestaurantServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.restaurant ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", name = "IRestaurantServiceBA")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface IRestaurantServiceBA
+{
+
+    /**
+     * 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
+     */
+    @javax.jws.WebMethod
+     @javax.jws.WebResult(partName = "bookSeatsBAResponse", name = "bookSeatsBAResponse")
+    public boolean bookSeats(
+	@javax.jws.WebParam(partName = "in0", name = "in0")
+	final int numSeats
+    );
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.taxi ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", name = "ITaxiService")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface ITaxiServiceAT
+{
+
+    /**
+     * Book a taxi.
+     */
+    @javax.jws.WebMethod
+    public void bookTaxi();
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/taxi/ITaxiServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.taxi ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", name = "ITaxiServiceBA")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface ITaxiServiceBA
+{
+
+    /**
+     * Book a taxi.
+     * @return true if successful, false otherwise.
+     */
+    @javax.jws.WebResult(partName = "bookTaxiBAResponse", name = "bookTaxiBAResponse")
+    @javax.jws.WebMethod
+    public boolean bookTaxi();
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.theatre ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", name = "ITheatreService")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface ITheatreServiceAT
+{
+
+    /**
+     * 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.
+     */
+    @javax.jws.WebMethod
+    public void bookSeats(
+	@javax.jws.WebParam(partName = "in0", name = "in0")
+	final int numSeats,
+	@javax.jws.WebParam(partName = "in1", name = "in1")
+	final int area
+    );
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/clients/jboss/theatre/ITheatreServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.clients.jboss.theatre ;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", name = "ITheatreServiceBA")
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+public interface ITheatreServiceBA
+{
+
+    /**
+     * 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.
+     */
+    @javax.jws.WebMethod
+    @javax.jws.WebResult(partName="bookSeatsBAResponse", name="bookSeatsBAResponse")
+    public boolean bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	final int numSeats,
+        @javax.jws.WebParam(partName = "in1", name = "in1")
+	final int area
+    );
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantService.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Restaurant;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", name = "IRestaurantService")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+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
+     */
+    @javax.jws.WebMethod
+    public void bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	int how_many
+    );
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/IRestaurantServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Restaurant;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", name = "IRestaurantServiceBA")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+
+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
+     */
+     @javax.jws.WebMethod
+     @javax.jws.WebResult(partName = "bookSeatsBAResponse", name = "bookSeatsBAResponse")
+     public boolean bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	int how_many
+    );
+
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantManager.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,456 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,201 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantParticipantBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "IRestaurantService",
+    serviceName = "IRestaurantServiceService",
+    portName = "RestaurantServiceAT",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", 
+    wsdlLocation = "file:wsdl/RestaurantServiceAT.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Restaurant.IRestaurantService")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "IRestaurantServiceBA",
+    serviceName = "IRestaurantServiceBAService",
+    portName = "RestaurantServiceBA",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant", 
+    wsdlLocation = "file:wsdl/RestaurantServiceBA.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Restaurant.IRestaurantServiceBA")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Restaurant/RestaurantView.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,470 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * RestaurantView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiService.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Taxi;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", name = "ITaxiService")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+
+public interface ITaxiService
+{
+    @javax.jws.WebMethod
+    public void bookTaxi();
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/ITaxiServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Taxi;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", name = "ITaxiServiceBA")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+
+public interface ITaxiServiceBA
+{
+    @javax.jws.WebResult(partName = "bookTaxiBAResponse", name = "bookTaxiBAResponse")
+    @javax.jws.WebMethod
+    public boolean bookTaxi();
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiManager.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,347 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiParticipantBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "ITaxiService",
+    serviceName = "ITaxiServiceService",
+    portName = "TaxiServiceAT",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", 
+    wsdlLocation = "file:wsdl/TaxiServiceAT.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Taxi.ITaxiService")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "ITaxiServiceBA",
+    serviceName = "ITaxiServiceBAService",
+    portName = "TaxiServiceBA",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi", 
+    wsdlLocation = "file:wsdl/TaxiServiceBA.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Taxi.ITaxiServiceBA")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Taxi/TaxiView.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,320 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TaxiView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreService.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Theatre;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", name = "ITheatreService")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+
+public interface ITheatreService
+{
+
+    @javax.jws.WebMethod
+    public void bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	int how_many,
+        @javax.jws.WebParam(partName = "in1", name = "in1")
+	int which_area);
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/ITheatreServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.xts.nightout.services.Theatre;
+
+ at javax.jws.WebService(targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", name = "ITheatreServiceBA")
+ at javax.jws.HandlerChain(file = "/WEB-INF/jaxws-handlers.xml") 
+ at javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
+
+public interface ITheatreServiceBA
+{
+    @javax.jws.WebMethod
+    @javax.jws.WebResult(partName="bookSeatsBAResponse", name="bookSeatsBAResponse")
+    public boolean bookSeats(
+        @javax.jws.WebParam(partName = "in0", name = "in0")
+	int how_many,
+        @javax.jws.WebParam(partName = "in1", name = "in1")
+	int which_area
+     );
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreManager.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,529 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreManager.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,201 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreParticipantAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantAT.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreParticipantBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreParticipantBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceAT.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreServiceAT.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "ITheatreService",
+    serviceName = "ITheatreServiceService",
+    portName = "TheatreServiceAT",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", 
+    wsdlLocation = "file:wsdl/TheatreServiceAT.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Theatre.ITheatreService")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreServiceBA.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreServiceBA.java
+ *
+ * Copyright (c) 2004 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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 $
+ */
+ at javax.jws.WebService(name = "ITheatreServiceBA",
+    serviceName = "ITheatreServiceBAService",
+    portName = "TheatreServiceBA",
+    targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre", 
+    wsdlLocation = "file:wsdl/TheatreServiceBA.wsdl" ,
+    endpointInterface = "com.arjuna.xts.nightout.services.Theatre.ITheatreServiceBA")
+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/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/src/com/arjuna/xts/nightout/services/Theatre/TheatreView.java	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,608 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU 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-2007,
+ * @author JBoss Inc.
+ */
+/*
+ * TheatreView.java
+ *
+ * Copyright (c) 2003 Arjuna Technologies Ltd.
+ *
+ * $Id:$
+ *
+ */
+
+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;
+}

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/a_nav_6699cc.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/a_nav_6699cc.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/arjuna_logo.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/arjuna_logo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_corner_10.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_corner_10.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_navcorner_20.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/bl_navcorner_20.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_corner_10.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_corner_10.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_navcorner_20.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/br_navcorner_20.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_corner_10.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_corner_10.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_navcorner_20.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tl_navcorner_20.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_corner_10.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_corner_10.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_navcorner_20.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/images/tr_navcorner_20.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/adinn/cxfdemo/web/index.jsp
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/web/index.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/web/index.jsp	2007-09-04 15:52:34 UTC (rev 14867)
@@ -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: index.jsp,v 1.6 2005/02/25 09:26:46 kconner Exp $ -->
+
+<head>
+<title>XML Transaction Service 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 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="basicclient">
+
+<% 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>
+


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/web/index.jsp
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/adinn/cxfdemo/xsl/ATL_LookAndFeel.xsl
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/xsl/ATL_LookAndFeel.xsl	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/xsl/ATL_LookAndFeel.xsl	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,663 @@
+<!--
+  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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" doctype-system="http://www.w3.org/TR/REC-html40/loose.dtd" encoding="ISO-8859-1" indent="yes"/>
+
+    <xsl:param name="rootpath" select="/page/@rootpath"/>
+    <xsl:param name="sitemap">../docs/includes/site-map.xml</xsl:param>
+
+    <xsl:template match="/">
+        <xsl:apply-templates/>
+    </xsl:template>
+
+    <xsl:template match="page">
+        <HTML>
+            <HEAD>
+                <META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems"/>
+                <META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service"/>
+                <TITLE><xsl:value-of select="@title"/></TITLE>
+                <xsl:element name="LINK">
+                    <xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/styles.css</xsl:attribute>
+                    <xsl:attribute name="rel">stylesheet</xsl:attribute>
+                    <xsl:attribute name="type">text/css</xsl:attribute>
+                </xsl:element>
+                <xsl:element name="SCRIPT">
+                    <xsl:attribute name="type">text/javascript</xsl:attribute>
+                    <xsl:attribute name="language">JavaScript</xsl:attribute>
+
+if (parent != self)
+    top.location.href = location.href;
+
+function gotoURL(url)
+{
+    if (url != "")
+        location.href = url;
+}
+
+function printThisPage()
+{
+    window.print();
+}
+
+function emailThisPage()
+{
+    location.href = "mailto:?subject=" + document.title + "&amp;body=" + location.href;
+}
+                </xsl:element>
+            </HEAD>
+            <BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+                <TABLE width="727" border="0" align="center" cellpadding="0" cellspacing="0">
+                    <xsl:apply-templates/>
+                </TABLE>
+            </BODY>
+        </HTML>
+    </xsl:template>
+
+    <xsl:template match="header">
+        <TR>
+            <TD width="494">
+                <xsl:element name="IMG">
+                    <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/JBoss_DivOfRH_RGB.gif</xsl:attribute>
+                    <xsl:attribute name="alt">arjuna logo</xsl:attribute>
+                    <xsl:attribute name="width">178</xsl:attribute>
+                    <xsl:attribute name="height">63</xsl:attribute>
+                </xsl:element>
+            </TD>
+            <TD width="233">
+                <xsl:element name="IMG">
+                    <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/arjuna_strapline.gif</xsl:attribute>
+                    <xsl:attribute name="alt">arjuna strap line</xsl:attribute>
+                    <xsl:attribute name="width">233</xsl:attribute>
+                    <xsl:attribute name="height">63</xsl:attribute>
+                </xsl:element>
+            </TD>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="content[area]">
+        <TR>
+            <TD colspan="2">
+                <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                    <TR>
+                        <TD width="6" height="214">
+                            <xsl:element name="IMG">
+                                <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                <xsl:attribute name="width">6</xsl:attribute>
+                                <xsl:attribute name="height">10</xsl:attribute>
+                            </xsl:element>
+                        </TD>
+                        <xsl:apply-templates select="navigation"/>
+                        <TD width="6" height="214">
+                            <xsl:element name="IMG">
+                                <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                <xsl:attribute name="width">6</xsl:attribute>
+                                <xsl:attribute name="height">10</xsl:attribute>
+                            </xsl:element>
+                        </TD>
+                        <TD width="555" valign="top">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <xsl:apply-templates select="area"/>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="content[area-left]">
+        <TR>
+            <TD colspan="2">
+                <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                    <TR>
+                        <TD width="6" height="214">
+                            <xsl:element name="IMG">
+                                <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                <xsl:attribute name="width">6</xsl:attribute>
+                                <xsl:attribute name="height">10</xsl:attribute>
+                            </xsl:element>
+                        </TD>
+                        <xsl:apply-templates select="navigation"/>
+                        <TD width="6" height="214">
+                            <xsl:element name="IMG">
+                                <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                <xsl:attribute name="width">6</xsl:attribute>
+                                <xsl:attribute name="height">10</xsl:attribute>
+                            </xsl:element>
+                        </TD>
+                        <TD width="356" valign="top">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <xsl:apply-templates select="area-left"/>
+                            </TABLE>
+                        </TD>
+                        <TD width="6" height="214">
+                            <xsl:element name="IMG">
+                                <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                <xsl:attribute name="width">6</xsl:attribute>
+                                <xsl:attribute name="height">10</xsl:attribute>
+                            </xsl:element>
+                        </TD>
+                        <TD width="172" valign="top">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <xsl:apply-templates select="area-right|area-right-blue"/>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="navigation">
+        <TD width="172" valign="top">
+            <FORM name="form1" method="post" action="">
+                <TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+                    <TR>
+                        <TD height="57">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="height">8</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/header_grid.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:element name="IMG">
+                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                            <xsl:attribute name="width">6</xsl:attribute>
+                                            <xsl:attribute name="height">10</xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                                <TR>
+                                    <TD valign="top" bgcolor="#FFFFFF">
+                                        <xsl:apply-templates mode="nav"/>
+                                    </TD>
+                                </TR>
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="valign">top</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/search_bg.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:attribute name="class">bodytext</xsl:attribute>
+                                        <BR/>
+                                        <TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
+                                            <TR>
+                                                <TD width="15">
+                                                    <A href="javascript:printThisPage();">
+                                                        <xsl:element name="IMG">
+                                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/icon_printer.gif</xsl:attribute>
+                                                            <xsl:attribute name="width">15</xsl:attribute>
+                                                            <xsl:attribute name="height">14</xsl:attribute>
+                                                            <xsl:attribute name="border">0</xsl:attribute>
+                                                        </xsl:element>
+                                                    </A>
+                                                </TD>
+                                                <TD class="bodytext">
+                                                    <A href="javascript:printThisPage();">print this page</A>
+                                                </TD>
+                                            </TR>
+                                            <TR>
+                                                <TD width="15">
+                                                    <A href="javascript:emailThisPage();">
+                                                        <xsl:element name="IMG">
+                                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/icon_email.gif</xsl:attribute>
+                                                            <xsl:attribute name="width">15</xsl:attribute>
+                                                            <xsl:attribute name="height">14</xsl:attribute>
+                                                            <xsl:attribute name="border">0</xsl:attribute>
+                                                        </xsl:element>
+                                                    </A>
+                                                </TD>
+                                                <TD class="bodytext">
+                                                    <A href="javascript:emailThisPage();">email this page</A>
+                                                </TD>
+                                            </TR>
+                                        </TABLE>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </FORM>
+        </TD>
+    </xsl:template>
+
+    <xsl:template match="sitemap" mode="sitemap">
+        <xsl:element name="SELECT">
+            <xsl:attribute name="name">select</xsl:attribute>
+            <xsl:attribute name="class">bodytext</xsl:attribute>
+            <xsl:attribute name="onChange">gotoURL(this.options[selectedIndex].value);</xsl:attribute>
+            <OPTION label="site-map" value="">site-map</OPTION>
+            <xsl:apply-templates select="links" mode="sitemap"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="links" mode="sitemap">
+        <xsl:element name="OPTGROUP">
+            <xsl:attribute name="label"><xsl:value-of select="@title"/></xsl:attribute>
+            <xsl:apply-templates select="link" mode="sitemap"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="link" mode="sitemap">
+        <xsl:element name="OPTION">
+            <xsl:attribute name="label"><xsl:value-of select="text()"/></xsl:attribute>
+            <xsl:attribute name="value"><xsl:value-of select="$rootpath"/>/<xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="links[@include]" mode="nav">
+        <xsl:apply-templates select="document(@include)" mode="nav"/>
+    </xsl:template>
+
+    <xsl:template match="links[link]|links[abslink]" mode="header">
+        <TR>
+            <TD colspan="2">
+                <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                    <TR>
+                        <TD class="menuoptions">
+                            <xsl:apply-templates mode="header"/>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="links[link]|links[abslink]" mode="nav">
+        <P class="menuheader">
+            <xsl:value-of select="@title"/>
+            <DIV class="menuoptions">
+                <xsl:apply-templates mode="nav"/>
+            </DIV>
+        </P>
+    </xsl:template>
+
+    <xsl:template match="links[news]|links[absnews]" mode="header">
+        <xsl:message terminate="yes">
+            "news/absnews" in header not supported
+        </xsl:message>
+    </xsl:template>
+
+    <xsl:template match="links[news]|links[absnews]" mode="nav">
+        <P class="menuheader" valign="top">
+            <xsl:value-of select="@title"/>
+            <DIV class="quotetext">
+                <xsl:apply-templates mode="nav"/>
+            </DIV>
+        </P>
+    </xsl:template>
+
+    <xsl:template match="link[position()!=last()]" mode="header">
+        <xsl:element name="A">
+             <xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/<xsl:value-of select="@ref"/></xsl:attribute>
+             <xsl:value-of select="text()"/>
+        </xsl:element>
+        <xsl:element name="IMG">
+            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/menu_spacer.gif</xsl:attribute>
+            <xsl:attribute name="width">11</xsl:attribute>
+            <xsl:attribute name="height">10</xsl:attribute>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="link[position()=last()]" mode="header">
+        <xsl:element name="A">
+             <xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/<xsl:value-of select="@ref"/></xsl:attribute>
+             <xsl:value-of select="text()"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="link" mode="nav">
+        <xsl:element name="A">
+             <xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/<xsl:value-of select="@ref"/></xsl:attribute>
+             <xsl:value-of select="text()"/>
+        </xsl:element>
+        <BR/>
+    </xsl:template>
+
+    <xsl:template match="abslink[position()!=last()]" mode="header">
+        <xsl:element name="A">
+            <xsl:attribute name="href"><xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:attribute name="target"><xsl:value-of select="@target"/></xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+        <xsl:element name="IMG">
+            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/menu_spacer.gif</xsl:attribute>
+            <xsl:attribute name="width">11</xsl:attribute>
+            <xsl:attribute name="height">10</xsl:attribute>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="abslink[position()=last()]" mode="header">
+        <xsl:element name="A">
+            <xsl:attribute name="href"><xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:attribute name="target"><xsl:value-of select="@target"/></xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="abslink" mode="nav">
+        <xsl:element name="A">
+            <xsl:attribute name="href"><xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+        <BR/>
+    </xsl:template>
+
+    <xsl:template match="news" mode="header">
+        <xsl:message terminate="yes">
+            "news" in header not supported
+        </xsl:message>
+    </xsl:template>
+
+    <xsl:template match="news" mode="nav">
+        <xsl:element name="A">
+            <xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/<xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:attribute name="class">newsflash</xsl:attribute>
+            <xsl:attribute name="style">text-decoration: none</xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+        <BR/>
+    </xsl:template>
+
+    <xsl:template match="absnews" mode="header">
+        <xsl:message terminate="yes">
+            "absnews" in header not supported
+        </xsl:message>
+    </xsl:template>
+
+    <xsl:template match="absnews" mode="nav">
+        <xsl:element name="A">
+            <xsl:attribute name="href"><xsl:value-of select="@ref"/></xsl:attribute>
+            <xsl:attribute name="class">newsflash</xsl:attribute>
+            <xsl:attribute name="style">text-decoration: none</xsl:attribute>
+            <xsl:value-of select="text()"/>
+        </xsl:element>
+        <BR/>
+    </xsl:template>
+
+    <xsl:template match="separator" mode="header">
+    </xsl:template>
+
+    <xsl:template match="separator" mode="nav">
+    </xsl:template>
+
+    <xsl:template match="spacer" mode="header">
+    </xsl:template>
+
+    <xsl:template match="spacer" mode="nav">
+    </xsl:template>
+
+    <xsl:template match="area">
+        <TR>
+            <TD width="537" valign="top">
+                <TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+                    <TR>
+                        <TD height="57">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="height">8</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/header_grid.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:element name="IMG">
+                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                            <xsl:attribute name="width">6</xsl:attribute>
+                                            <xsl:attribute name="height">10</xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                                <TR>
+                                    <TD valign="top" bgcolor="#FFFFFF">
+                                        <P class="menuheader">
+                                           <xsl:value-of select="@title"/>
+                                           <DIV class="bodytext">
+                                               <xsl:apply-templates/>
+                                           </DIV>
+                                        </P>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+        <TR>
+            <xsl:element name="TD">
+                <xsl:attribute name="height">8</xsl:attribute>
+                <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+            </xsl:element>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="area-left">
+        <TR>
+            <TD width="365" valign="top">
+                <TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+                    <TR>
+                        <TD height="57">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="height">8</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/header_grid.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:element name="IMG">
+                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                            <xsl:attribute name="width">6</xsl:attribute>
+                                            <xsl:attribute name="height">10</xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                                <TR>
+                                    <TD valign="top" bgcolor="#FFFFFF">
+                                        <P class="menuheader">
+                                           <xsl:value-of select="@title"/>
+                                           <DIV class="bodytext">
+                                               <xsl:apply-templates/>
+                                           </DIV>
+                                        </P>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+        <TR>
+            <xsl:element name="TD">
+                <xsl:attribute name="height">8</xsl:attribute>
+                <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+            </xsl:element>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="area-right">
+        <TR>
+            <TD width="172" valign="top">
+                <TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="9E9E9E">
+                    <TR>
+                        <TD height="57">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="height">8</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/header_grid.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:element name="IMG">
+                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                            <xsl:attribute name="width">6</xsl:attribute>
+                                            <xsl:attribute name="height">10</xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                                <TR>
+                                    <TD valign="top" bgcolor="#FFFFFF">
+                                        <P class="menuheader">
+                                           <xsl:value-of select="@title"/>
+                                           <DIV class="bodytext">
+                                               <xsl:apply-templates/>
+                                           </DIV>
+                                        </P>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+        <TR>
+            <xsl:element name="TD">
+                <xsl:attribute name="height">8</xsl:attribute>
+                <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+            </xsl:element>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="area-right-blue">
+        <TR>
+            <TD width="172" valign="top">
+                <TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9E9E9E">
+                    <TR>
+                        <TD height="57">
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
+                                <TR>
+                                    <xsl:element name="TD">
+                                        <xsl:attribute name="height">8</xsl:attribute>
+                                        <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/header_grid.gif</xsl:attribute>
+                                        <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+                                        <xsl:element name="IMG">
+                                            <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                                            <xsl:attribute name="width">6</xsl:attribute>
+                                            <xsl:attribute name="height">10</xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:element>
+                                </TR>
+                            </TABLE>
+                            <TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
+                                <TR>
+                                    <TD valign="top" bgcolor="#ECECEC">
+                                        <P class="menuheader">
+                                           <xsl:value-of select="@title"/>
+                                           <DIV class="bodytext">
+                                               <xsl:apply-templates/>
+                                           </DIV>
+                                        </P>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+                        </TD>
+                    </TR>
+                </TABLE>
+            </TD>
+        </TR>
+        <TR>
+            <xsl:element name="TD">
+                <xsl:attribute name="height">8</xsl:attribute>
+                <xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/trans_spacer.gif</xsl:attribute>
+                <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
+            </xsl:element>
+        </TR>
+    </xsl:template>
+
+    <xsl:template match="area/@text">
+        <SPAN class="bodytext">
+            <xsl:value-of select="text()"/>
+        </SPAN>
+    </xsl:template>
+
+    <xsl:template match="area//html//*">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+
+    <xsl:template match="area-left/@text">
+        <SPAN class="bodytext">
+            <xsl:value-of select="text()"/>
+        </SPAN>
+    </xsl:template>
+
+    <xsl:template match="area-left//html//*">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+
+    <xsl:template match="area-right/@text">
+        <SPAN class="bodytext">
+            <xsl:value-of select="text()"/>
+        </SPAN>
+    </xsl:template>
+
+    <xsl:template match="area-right//html//*">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+
+    <xsl:template match="area-right-blue/@text">
+        <SPAN class="bodytext">
+            <xsl:value-of select="text()"/>
+        </SPAN>
+    </xsl:template>
+
+    <xsl:template match="area-right-blue//html//*">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+
+    <xsl:template match="footer">
+        <TR>
+            <TD width="727" valign="top" align="right" colspan="3">
+                <FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
+
+                    Copyright 2002-2005 Arjuna Technologies
+
+                    <xsl:element name="IMG">
+                        <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/spacer.jpg</xsl:attribute>
+                        <xsl:attribute name="alt"></xsl:attribute>
+                        <xsl:attribute name="border">0</xsl:attribute>
+                    </xsl:element>
+
+                    All Rights Reserved.
+
+                    <br/><a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a>
+
+                    <xsl:element name="IMG">
+                        <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/spacer.jpg</xsl:attribute>
+                        <xsl:attribute name="alt"></xsl:attribute>
+                        <xsl:attribute name="border">0</xsl:attribute>
+                    </xsl:element>
+
+                    +44 191 243 0676
+                </FONT>
+            </TD>
+        </TR>
+    </xsl:template>
+</xsl:stylesheet>

Added: labs/jbosstm/workspace/adinn/cxfdemo/xts-build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/cxfdemo/xts-build.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/cxfdemo/xts-build.xml	2007-09-04 15:52:34 UTC (rev 14867)
@@ -0,0 +1,322 @@
+<!--
+  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-2007,
+  @author JBoss Inc.
+-->
+
+<!-- $Id:$ -->
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--           Copyright (c) 2003, Arjuna Technologies Limited.             -->
+<!--                                                                        -->
+<!--                 WS-Transaction / XTS demo application                  -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+
+<project name="xts-cxfdemo" default="build" basedir=".">
+
+    <!-- ================================================================== -->
+
+    <!-- A JBoss build will always be generated.                            -->
+
+    <!-- The properties to override are the following:                      -->
+    <!--    hostname (defaults to localhost)                                -->
+    <!--    port (defaults to 8080)                                         -->
+    <!--    urlstub (defaults to xtsdemowebservices)                        -->
+
+    <!--    deploy.dir The deployment directory for the ear                 -->
+    <!-- ================================================================== -->
+
+    <property environment="env"/>
+    <property name="deploy.dir" value="${env.JBOSS_HOME}/server/default/deploy"/>
+
+    <xmlproperty file="${xmlpropertyfile}" keeproot="false"/>
+
+    <property name="xts.home" value="${env.XTS_HOME}"/>
+    <property name="cxf.home" value="${env.CXF_HOME}"/>
+    <property name="conf.dir" location="${xts.home}/conf"/>
+
+    <property name="lib.dir" location="${xts.home}/lib"/>
+    <property name="ext.dir" location="${lib.dir}/ext"/>
+    <property name="cxf.lib.dir" location="${cxf.home}/lib"/>
+    <property name="cxf.etc" location="${cxf.home}/etc"/>
+
+    <property name="lib.libs" value="wstx.jar ws-t.jar ws-c.jar"/>
+    <property name="ext.libs" value="jbossjta.jar"/>
+
+    <!-- cxf libraries which replace ones in server lib dir -->
+
+    <property name="cxf.as.shared.libs"
+	      value="stax-api-1.0.1.jar wstx-asl-3.2.1.jar
+		     saaj-api-1.3.jar saaj-impl-1.3.jar
+		     geronimo-activation_1.1_spec-1.0-M1.jar"/>
+
+    <!-- corresponding excludes from cxf lib dir -->
+
+    <property name="cxf.as.shared.libs.excludes"
+	      value="lib/stax-api-1.0.1.jar lib/wstx-asl-3.2.1.jar
+		     lib/saaj-api-1.3.jar lib/saaj-impl-1.3.jar
+		     lib/geronimo-activation_1.1_spec-1.0-M1.jar"/>
+
+    <!-- cxf libraries which replace ones in server deploy/jbossws-sar dir -->
+
+    <property name="cxf.jbossws.shared.libs"
+	      value="jaxws-api-2.0.jar geronimo-ws-metadata_2.0_spec-1.1.1.jar
+		     jaxb-api-2.0.jar jaxb-impl-2.0.5.jar"/>
+
+    <!-- corresponding excludes from cxf lib dir -->
+
+    <property name="cxf.jbossws.shared.libs.excludes"
+	      value="lib/jaxws-api-2.0.jar lib/geronimo-ws-metadata_2.0_spec-1.1.1.jar
+		     lib/jaxb-api-2.0.jar lib/jaxb-impl-2.0.5.jar"/>
+
+    <!-- all cxf libraries which replace as libraries -->
+
+    <property name="cxf.shared.libs"
+	      value="${cxf.as.shared.libs} ${cxf.jbossws.shared.libs}"/>
+
+    <!-- all excludes from cxf lib dir -->
+
+    <property name="cxf.shared.libs.excludes"
+	      value="${cxf.as.shared.libs.excludes} ${cxf.jbossws.shared.libs.excludes}"/>
+
+    <property name="cxf.ext.libs" value="cxf-manifest-incubator.jar cxf-2.0-incubator.jar
+		     aopalliance-1.0.jar cxf-bundle-2.0-incubator.jar
+		     jra-1.0-alpha-3.jar cxf-tools-java2wsdl-2.0-incubator.jar
+		     cxf-xjc-dv-2.0-incubator.jar cxf-rt-management-2.0-incubator.jar
+		     jetty-util-6.1.3.jar cxf-rt-core-2.0-incubator.jar
+		     cxf-common-utilities-2.0-incubator.jar bcprov-jdk14-136.jar
+		     XmlSchema-1.2.jar spring-beans-2.0.4.jar
+		     cxf-rt-bindings-xml-2.0-incubator.jar
+		     cxf-rt-ws-security-2.0-incubator.jar
+		     cxf-rt-frontend-simple-2.0-incubator.jar
+		     cxf-api-2.0-incubator.jar commons-logging-1.1.jar
+		     velocity-dep-1.4.jar 
+		     jettison-1.0-RC1.jar
+		     spring-core-2.0.4.jar cxf-rt-transports-http-2.0-incubator.jar
+		     xalan-2.7.0.jar cxf-rt-bindings-soap-2.0-incubator.jar
+		     stax-utils-20060502.jar velocity-1.4.jar wsdl4j-1.6.1.jar
+		     slf4j-api-1.3.1.jar cxf-rt-ws-rm-2.0-incubator.jar
+		     cxf-rt-ws-policy-2.0-incubator.jar 
+		     cxf-rt-ws-addr-2.0-incubator.jar spring-web-2.0.4.jar
+		     cxf-rt-bindings-http-2.0-incubator.jar servlet-api-2.5-6.1.3.jar
+		     spring-context-2.0.4.jar
+		     cxf-rt-databinding-jaxb-2.0-incubator.jar
+		     cxf-rt-frontend-jaxws-2.0-incubator.jar
+		     cxf-tools-wsdlto-core-2.0-incubator.jar
+		     cxf-common-schemas-2.0-incubator.jar wss4j-1.5.1.jar
+		     geronimo-jms_1.1_spec-1.1.jar jaxb-xjc-2.0.jar
+		     geronimo-javamail_1.4_spec-1.0-M1.jar
+		     cxf-rt-transports-jms-2.0-incubator.jar jdom-1.0.jar
+		     cxf-rt-databinding-aegis-2.0-incubator.jar
+		     xmlsec-1.3.0.jar xml-resolver-1.2.jar slf4j-jdk14-1.3.1.jar
+		     cxf-tools-validator-2.0-incubator.jar jaxen-1.1.jar
+		     cxf-rt-transports-http-jetty-2.0-incubator.jar
+		     geronimo-servlet_2.5_spec-1.1-M1.jar xml-apis-1.3.02.jar
+		     cxf-rt-transports-local-2.0-incubator.jar
+		     cxf-tools-wsdlto-frontend-jaxws-2.0-incubator.jar
+		     cxf-tools-wsdlto-databinding-jaxb-2.0-incubator.jar js-1.6R5.jar
+		     xbean-2.2.0.jar cxf-tools-common-2.0-incubator.jar
+		     jetty-6.1.3.jar cxf-rt-bindings-object-2.0-incubator.jar
+		     cxf-rt-frontend-js-2.0-incubator.jar
+		     cxf-rt-bindings-coloc-2.0-incubator.jar neethi-2.0.jar
+		     cxf-tools-misctools-2.0-incubator.jar
+		     geronimo-annotation_1.0_spec-1.1.jar"/>
+
+    <property name="ext.compile" value="${ext.libs} jaxrpc.jar servlet.jar"/>
+    <property name="cxf.compile" value="${cxf.shared.libs} ${cxf.ext.libs}"/>
+
+    <property name="ext.package" value="${ext.libs} jbossts-common.jar commons-logging.jar"/>
+    <property name="cxf.ext.package" value="${cxf.ext.libs}"/>
+    <!-- ================================================================== -->
+
+    <property name="build.dir" location="build"/>
+    <property name="src.dir" location="src"/>
+    <property name="web.dir" location="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.soapconfig" location="${build.dir}/soapconfig"/>
+    <property name="appinf.dir" location="${build.dir}/APP-INF"/>
+    <property name="appinflib.dir" location="${appinf.dir}/lib"/>
+
+    <property name="javac.debug"             value="on"/>
+    <property name="javac.optimize"          value="off"/>
+
+    <path id="lib.path">
+        <fileset dir="${lib.dir}" includes="${lib.libs}"/>
+    </path>
+    <path id="ext.path">
+        <fileset dir="${ext.dir}" includes="${ext.compile}"/>
+    </path>
+    <path id="cxf.path">
+        <fileset dir="${cxf.lib.dir}" includes="${cxf.compile}"/>
+    </path>
+
+    <filterset id="webxml.filter">
+        <filter token="restaurantATURL" value="${restaurantATURL}"/>
+        <filter token="restaurantBAURL" value="${restaurantBAURL}"/>
+        <filter token="taxiATURL" value="${taxiATURL}"/>
+        <filter token="taxiBAURL" value="${taxiBAURL}"/>
+        <filter token="theatreATURL" value="${theatreATURL}"/>
+        <filter token="theatreBAURL" value="${theatreBAURL}"/>
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <filter token="urlstub" value="${urlstub}"/>
+    </filterset>
+
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+        <delete>
+            <fileset dir="." includes="**/*.bak" defaultexcludes="no"/>
+            <fileset dir="." includes="**/*~"    defaultexcludes="no"/>
+            <fileset dir="." includes="**/#*#"   defaultexcludes="no"/>
+            <fileset dir="." includes="**/.#*"   defaultexcludes="no"/>
+        </delete>
+    </target>
+
+    <target name="init-properties">
+        <property name="hostname" value="localhost"/>
+        <property name="port" value="8080"/>
+        <property name="urlstub" value="xtsdemowebservices"/>
+        <path id="compile.path">
+            <path refid="cxf.path"/>
+            <path refid="lib.path"/>
+            <path refid="ext.path"/>
+        </path>
+    </target>
+
+    <target name="init" depends="init-properties">
+        <mkdir dir="${build.dir}"/>
+        <mkdir dir="${build.dir}/classes"/>
+        <mkdir dir="${build.config}"/>
+        <mkdir dir="${build.soapconfig}"/>
+        <mkdir dir="${appinf.dir}"/>
+        <mkdir dir="${appinflib.dir}"/>
+    </target>
+
+    <target name="compile" depends="init">
+        <javac destdir="${build.dir}/classes" debug="${javac.debug}"
+            optimize="${javac.optimize}" deprecation="${javac.deprecation}" >
+            <classpath>
+                <path refid="compile.path"/>
+            </classpath>
+            <src path="${src.dir}"/>
+            <patternset>
+                <include name="com/arjuna/xts/nightout/clients/jboss/**/*.java"/>
+                <include name="com/arjuna/xts/nightout/services/**/*.java"/>
+            </patternset>
+        </javac>
+    </target>
+
+    <!-- the server side elements -->
+    <target name="config" depends="insertcfg">
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <copy todir="${build.config}" filtering="true">
+            <fileset dir="${conf.dir}" includes="wscf.xml wstx.xml wst.xml"/>
+        </copy>
+        <jar destfile="${build.dir}/config.jar" basedir="${build.config}"/>
+    </target>
+
+    <target name="jboss-webservices" depends="compile">
+      <war destfile="${build.dir}/xts-demo-webservices.war" webxml="${cxf.etc}/web.xml">
+            <webinf dir="${jboss.dd.dir}" includes="cxf-servlet.xml wsdl/**"/>
+            <webinf dir="${build.dir}/">
+                <include name="classes/com/arjuna/xts/nightout/services/**"/>
+            </webinf>
+            <webinf dir="${jboss.dd.dir}">
+	      <include name="jaxws-handlers.xml"/>
+            </webinf>
+	    <webinf dir="${cxf.home}"
+		    includes="lib/*.jar"
+		    excludes="${cxf.shared.libs.excludes}"/>
+	    <metainf dir="META-INF">
+	      <include name="**"/>
+	    </metainf>
+        </war>
+    </target>
+
+    <!-- the client side elements -->
+    <target name="jboss-webapp" depends="compile">
+        <copy tofile="${build.dir}/client-web-app.xml" file="${jboss.dd.dir}/client-web-app.xml">
+            <filterset refid="webxml.filter"/>
+        </copy>
+
+        <war warfile="${build.dir}/xts-demo.war" webxml="${build.dir}/client-web-app.xml">
+            <webinf dir="${build.dir}/">
+                <include name="classes/**/*"/>
+                <exclude name="classes/com/arjuna/xts/nightout/services/**/*"/>
+            </webinf>
+            <fileset dir="${web.dir}"/>
+            <webinf dir="${jboss.dd.dir}" includes="wsdl/**"/>
+	    <webinf dir="${cxf.home}"
+		    includes="lib/*.jar"
+		    excludes="${cxf.shared.libs.excludes}"/>
+	    <metainf dir="META-INF">
+	      <include name="**"/>
+	    </metainf>
+        </war>
+    </target>
+
+    <target name="jboss-ear" depends="jboss-webservices, jboss-webapp, config">
+        <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="${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"/>
+        </ear>
+    </target>
+
+    <target name="build" depends="jboss-ear"/>
+
+    <target name="insertcfg" depends="init">
+        <filter token="hostname" value="${hostname}"/>
+        <filter token="port" value="${port}"/>
+        <filter token="urlstub" value="${urlstub}"/>
+
+        <unjar src="${xts.home}/webapps/ws-c.war" dest="${build.dir}/tmp/ws-c"/>
+
+        <copy file="${xts.home}/coordinator/dd/ws-c_web-app.xml"
+            tofile="${build.dir}/tmp/ws-c/WEB-INF/web.xml" filtering="true" overwrite="true"/>
+
+        <jar destfile="${build.dir}/ws-c.war" basedir="${build.dir}/tmp/ws-c" manifest="${build.dir}/tmp/ws-c/META-INF/MANIFEST.MF"/>
+
+        <delete dir="${build.dir}/tmp/ws-c"/>
+
+        <unjar src="${xts.home}/webapps/ws-t.war" dest="${build.dir}/tmp/ws-t"/>
+
+        <copy file="${xts.home}/coordinator/dd/ws-t_web-app.xml"
+            tofile="${build.dir}/tmp/ws-t/WEB-INF/web.xml" filtering="true" overwrite="true"/>
+
+        <jar destfile="${build.dir}/ws-t.war" basedir="${build.dir}/tmp/ws-t" manifest="${build.dir}/tmp/ws-t/META-INF/MANIFEST.MF"/>
+
+        <delete dir="${build.dir}/tmp/ws-t"/>
+    </target>
+
+    <target name="deploy" depends="build, undeploy">
+        <copy file="${build.dir}/xts-demo.ear" tofile="${deploy.dir}/xts-demo.ear"/>
+    </target>
+
+    <target name="undeploy">
+        <delete file="${deploy.dir}/xts-demo.ear"/>
+    </target>
+
+</project>


Property changes on: labs/jbosstm/workspace/adinn/cxfdemo/xts-build.xml
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-svn-commits mailing list