[jboss-svn-commits] JBL Code SVN: r26410 - in labs/jbosstm/workspace/resttx: tx and 23 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed May 6 17:07:32 EDT 2009


Author: mmusgrov
Date: 2009-05-06 17:07:32 -0400 (Wed, 06 May 2009)
New Revision: 26410

Added:
   labs/jbosstm/workspace/resttx/tx/
   labs/jbosstm/workspace/resttx/tx/pom.xml
   labs/jbosstm/workspace/resttx/tx/rest-tx.iml
   labs/jbosstm/workspace/resttx/tx/rest-tx.ipr
   labs/jbosstm/workspace/resttx/tx/rest-tx.iws
   labs/jbosstm/workspace/resttx/tx/src/
   labs/jbosstm/workspace/resttx/tx/src/main/
   labs/jbosstm/workspace/resttx/tx/src/main/java/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/client/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/client/TxTest.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Participant.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Work.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseException.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseMapper.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/NotFoundMapper.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/ResourceNotFoundException.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableException.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableMapper.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusException.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusMapper.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecordSetup.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/TransactionList.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TransactionalParticipant.java
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/util/
   labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java
   labs/jbosstm/workspace/resttx/tx/src/main/webapp/
   labs/jbosstm/workspace/resttx/tx/src/main/webapp/WEB-INF/
   labs/jbosstm/workspace/resttx/tx/src/main/webapp/WEB-INF/web.xml
   labs/jbosstm/workspace/resttx/tx/src/test/
   labs/jbosstm/workspace/resttx/tx/src/test/java/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/test/
   labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/test/AppTest.java
   labs/jbosstm/workspace/resttx/tx/src/test/resources/
   labs/jbosstm/workspace/resttx/tx/src/test/resources/jbossjta-properties.xml
   labs/jbosstm/workspace/resttx/tx/src/test/resources/log4j.xml
Log:
Demo


Added: labs/jbosstm/workspace/resttx/tx/pom.xml
===================================================================
--- labs/jbosstm/workspace/resttx/tx/pom.xml	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/pom.xml	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    JBoss, Home of Professional Open Source Copyright 2009, Red Hat
+    Middleware LLC, and others contributors as indicated by the @authors
+    tag. All rights reserved. See the copyright.txt in the distribution
+    for a full listing of individual contributors. This copyrighted
+    material is made available to anyone wishing to use, modify, copy, or
+    redistribute it subject to the terms and conditions of the GNU Lesser
+    General Public License, v. 2.1. This program is distributed in the
+    hope that it will be useful, but WITHOUT A WARRANTY; without even the
+    implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+    PURPOSE. See the GNU Lesser General Public License for more details.
+    You should have received a copy of the GNU Lesser General Public
+    License, v.2.1 along with this distribution; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.jbossts.rts</groupId>
+   <artifactId>rest-tx-api</artifactId>
+   <version>1.0-M1-SNAPSHOT</version>
+   <packaging>jar</packaging>
+   <name>RESTful API for Atomic Transactions</name>
+   <description>Provides Transactions for web applications</description>
+
+   <repositories>
+      <repository>
+         <id>java.net</id>
+         <url>http://download.java.net/maven/1</url>
+         <layout>legacy</layout>
+      </repository>
+      <repository>
+         <id>maven repo</id>
+         <name>maven repo</name>
+         <url>http://repo1.maven.org/maven2/</url>
+      </repository>
+      <repository>
+         <id>jboss</id>
+         <name>jboss repo</name>
+         <url>http://repository.jboss.org/maven2</url>
+      </repository>
+      <repository>
+         <id>scannotation</id>
+         <url>http://scannotation.sf.net/maven2</url>
+      </repository>
+   </repositories>
+
+   <dependencies>
+      <dependency>
+        <groupId>jboss.jbossts</groupId>
+        <artifactId>jbossjts</artifactId>
+        <version>4.4.0.GA</version>
+      </dependency>
+    <dependency>
+      <groupId>jboss.jbossts</groupId>
+      <artifactId>jbossts-common</artifactId>
+      <version>4.4.0.GA</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+      <version>3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.5</version>
+    </dependency>
+
+      <dependency>
+         <groupId>org.jboss.resteasy</groupId>
+         <artifactId>resteasy-jaxrs</artifactId>
+         <version>1.0-RC1</version>
+
+         <!-- filter out unwanted jars -->
+         <exclusions>
+            <exclusion>
+               <groupId>commons-httpclient</groupId>
+               <artifactId>commons-httpclient</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+      <dependency>
+          <groupId>org.jboss.resteasy</groupId>
+          <artifactId>resteasy-jaxb-provider</artifactId>
+          <version>1.0-RC1</version>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <source>1.5</source>
+               <target>1.5</target>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>

Added: labs/jbosstm/workspace/resttx/tx/rest-tx.iml
===================================================================
--- labs/jbosstm/workspace/resttx/tx/rest-tx.iml	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/rest-tx.iml	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/target/rest-tx/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/target/rest-tx" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+          <containerElement type="library" level="module">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/lib/resteasy-jaxrs-1.0-beta-8.jar" />
+            <url>jar://$MODULE_DIR$/target/rest-tx/WEB-INF/lib/resteasy-jaxrs-1.0-beta-8.jar!/</url>
+          </containerElement>
+          <containerElement type="library" level="module">
+            <attribute name="method" value="0" />
+            <attribute name="URI" value="&lt;N/A&gt;" />
+            <url>jar://$APPLICATION_HOME_DIR$/lib/javaee.jar!/</url>
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web2">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+          <containerElement type="library" level="module">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/lib/resteasy-jaxrs-1.0-beta-8.jar" />
+            <url>jar://$MODULE_DIR$/target/rest-tx/WEB-INF/lib/resteasy-jaxrs-1.0-beta-8.jar!/</url>
+          </containerElement>
+          <containerElement type="library" level="module">
+            <attribute name="method" value="0" />
+            <attribute name="URI" value="&lt;N/A&gt;" />
+            <url>jar://$APPLICATION_HOME_DIR$/lib/javaee.jar!/</url>
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web3">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src-/main/webapp/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src-/main/webapp" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web4">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/tmp/src/main/webapp/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/tmp/src/main/webapp" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web5" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/tmp/application/HotelWebapp/target/HotelWebapp/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/tmp/application/HotelWebapp/target/HotelWebapp" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web6" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/tmp/application/HotelWebapp/src/main/webapp/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/tmp/application/HotelWebapp/src/main/webapp" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="gwt" name="GWT">
+      <configuration>
+        <setting name="gwtSdkUrl" value="" />
+        <setting name="gwtScriptOutputStyle" value="DETAILED" />
+        <setting name="runGwtCompilerOnMake" value="true" />
+        <setting name="compilerMaxHeapSize" value="128" />
+      </configuration>
+    </facet>
+    <facet type="web" name="Web7" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/demo/tomcat/conf/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/demo/tomcat/conf" relative="/WEB-INF" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web8" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/demo/tomcat/webapps/ROOT/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/demo/tomcat/webapps/ROOT" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web9" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/demo1/tomcat/conf/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/demo1/tomcat/conf" relative="/WEB-INF" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web10" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/demo1/tomcat/webapps/ROOT/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/demo1/tomcat/webapps/ROOT" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+    <facet type="web" name="Web11" implicit="true">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/demo1/web/WEB-INF/web.xml" optional="false" version="2.5" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/demo1/web" relative="/" />
+        </webroots>
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/test/java" />
+        </sourceRoots>
+        <building>
+          <setting name="EXPLODED_URL" value="file://" />
+          <setting name="EXPLODED_ENABLED" value="false" />
+          <setting name="JAR_URL" value="file://" />
+          <setting name="JAR_ENABLED" value="false" />
+          <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+          <setting name="RUN_JASPER_VALIDATION" value="true" />
+          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+        </building>
+        <packaging>
+          <containerElement type="module" name="rest-tx">
+            <attribute name="method" value="1" />
+            <attribute name="URI" value="/WEB-INF/classes" />
+          </containerElement>
+        </packaging>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$APPLICATION_HOME_DIR$/lib/javaee.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="file://$MODULE_DIR$/target/classes" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/jaxrs-api-1.0-RC1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/commons-httpclient-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/webserver-1.3.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/jbossjts-4.4.0.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/commons-codec-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/resteasy-jaxb-provider-1.0-RC1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/resteasy-jaxrs-1.0-RC1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/log4j-1.2.12.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/commons-logging-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/jbossts-common-4.4.0.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../webservice/target/rest-tx-web-1.0-M1-SNAPSHOT/WEB-INF/lib/junit-4.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: labs/jbosstm/workspace/resttx/tx/rest-tx.ipr
===================================================================
--- labs/jbosstm/workspace/resttx/tx/rest-tx.ipr	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/rest-tx.ipr	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+  <component name="AntConfiguration">
+    <defaultAnt bundledAnt="true" />
+  </component>
+  <component name="BuildJarProjectSettings">
+    <option name="BUILD_JARS_ON_MAKE" value="false" />
+  </component>
+  <component name="CodeStyleProjectProfileManger">
+    <option name="PROJECT_PROFILE" />
+    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+  </component>
+  <component name="CodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS" />
+    <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+  </component>
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac" />
+    <option name="DEPLOY_AFTER_MAKE" value="0" />
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)" />
+      <entry name=".+\.(gif|png|jpeg|jpg)" />
+    </resourceExtensions>
+    <wildcardResourcePatterns>
+      <entry name="?*.properties" />
+      <entry name="?*.xml" />
+      <entry name="?*.gif" />
+      <entry name="?*.png" />
+      <entry name="?*.jpeg" />
+      <entry name="?*.jpg" />
+      <entry name="?*.html" />
+      <entry name="?*.dtd" />
+      <entry name="?*.tld" />
+    </wildcardResourcePatterns>
+  </component>
+  <component name="CppTools.Loader" reportImplicitCastToBool="false" version="1" />
+  <component name="DependenciesAnalyzeManager">
+    <option name="myForwardDirection" value="false" />
+  </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+  </component>
+  <component name="EclipseCompilerSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="true" />
+    <option name="DEPRECATION" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="EclipseEmbeddedCompilerSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="true" />
+    <option name="DEPRECATION" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="EntryPointsManager">
+    <entry_points version="2.0" />
+  </component>
+  <component name="FacetAutodetectingManager">
+    <autodetection-disabled>
+      <facet-type id="web">
+        <modules>
+          <module name="jms-facade">
+            <files>
+              <file url="file:///home/mmusgrov/misc/rest/resteasy-jaxrs-1.0-beta-8/examples/jms-facade/resteasy-mom-war/src/main/webapp/WEB-INF/web.xml" />
+            </files>
+          </module>
+        </modules>
+      </facet-type>
+    </autodetection-disabled>
+  </component>
+  <component name="IdProvider" IDEtalkID="3ADD3A71D4ED4170C5A947B58B847444" />
+  <component name="InspectionProjectProfileManager">
+    <option name="PROJECT_PROFILE" value="Project Default" />
+    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+    <scopes />
+    <profiles>
+      <profile version="1.0" is_locked="false">
+        <option name="myName" value="Project Default" />
+        <option name="myLocal" value="false" />
+        <inspection_tool class="EmptyCatchBlock" level="WARNING" enabled="false">
+          <option name="m_includeComments" value="true" />
+          <option name="m_ignoreTestCases" value="true" />
+          <option name="m_ignoreIgnoreParameter" value="true" />
+        </inspection_tool>
+      </profile>
+    </profiles>
+    <list size="0" />
+  </component>
+  <component name="JavacSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="DEPRECATION" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY" />
+    <option name="OPTION_SCOPE" value="protected" />
+    <option name="OPTION_HIERARCHY" value="true" />
+    <option name="OPTION_NAVIGATOR" value="true" />
+    <option name="OPTION_INDEX" value="true" />
+    <option name="OPTION_SEPARATE_INDEX" value="true" />
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+    <option name="OPTION_DEPRECATED_LIST" value="true" />
+    <option name="OTHER_OPTIONS" value="" />
+    <option name="HEAP_SIZE" />
+    <option name="LOCALE" />
+    <option name="OPEN_IN_BROWSER" value="true" />
+  </component>
+  <component name="JikesSettings">
+    <option name="JIKES_PATH" value="" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="DEPRECATION" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="IS_EMACS_ERRORS_MODE" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+  <component name="ProjectFileVersion" converted="true" />
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/rest-tx.iml" filepath="$PROJECT_DIR$/rest-tx.iml" />
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+  <component name="ResourceManagerContainer">
+    <option name="myResourceBundles">
+      <value>
+        <list size="0" />
+      </value>
+    </option>
+  </component>
+  <component name="RmicSettings">
+    <option name="IS_EANABLED" value="false" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="GENERATE_IIOP_STUBS" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="" />
+  </component>
+  <component name="WebServicesPlugin" addRequiredLibraries="true" />
+</project>
+

Added: labs/jbosstm/workspace/resttx/tx/rest-tx.iws
===================================================================
--- labs/jbosstm/workspace/resttx/tx/rest-tx.iws	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/rest-tx.iws	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,1092 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project relativePaths="false" version="4">
+  <component name="CCaseConfig">
+    <option name="checkoutReserved" value="false" />
+    <option name="markExternalChangeAsUpToDate" value="true" />
+    <option name="checkInUseHijack" value="true" />
+    <option name="useUcmModel" value="true" />
+    <option name="isOffline" value="false" />
+    <option name="synchOutside" value="false" />
+    <option name="isHistoryResticted" value="true" />
+    <option name="useIdenticalSwitch" value="true" />
+    <option name="synchActivitiesOnRefresh" value="true" />
+    <option name="lastScr" value="" />
+    <option name="scrTextFileName" value="" />
+    <option name="historyRevisionsNumber" value="4" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" name="Default" comment="" />
+    <ignored path="rest-tx.iws" />
+    <ignored path=".idea/workspace.xml" />
+  </component>
+  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+  <component name="Commander">
+    <leftPanel />
+    <rightPanel />
+    <splitter proportion="0.5" />
+  </component>
+  <component name="CreatePatchCommitExecutor">
+    <option name="PATCH_PATH" value="" />
+    <option name="REVERSE_PATCH" value="false" />
+  </component>
+  <component name="DaemonCodeAnalyzer">
+    <disable_hints />
+  </component>
+  <component name="DebuggerManager">
+    <line_breakpoints>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java" line="146" class="org.jboss.jbossts.rts.resource.RESTRecord" package="org.jboss.jbossts.rts.resource">
+        <option name="ENABLED" value="true" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java" line="169" class="org.jboss.jbossts.rts.resource.RESTRecord" package="org.jboss.jbossts.rts.resource">
+        <option name="ENABLED" value="true" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java" line="194" class="org.jboss.jbossts.rts.resource.RESTRecord" package="org.jboss.jbossts.rts.resource">
+        <option name="ENABLED" value="true" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java" line="262" class="org.jboss.jbossts.rts.resource.RESTRecord" package="org.jboss.jbossts.rts.resource">
+        <option name="ENABLED" value="true" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java" line="114" class="org.jboss.jbossts.rts.resource.RESTRecord" package="org.jboss.jbossts.rts.resource">
+        <option name="ENABLED" value="true" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+    </line_breakpoints>
+    <breakpoint_any>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true" />
+        <option name="NOTIFY_UNCAUGHT" value="true" />
+        <option name="ENABLED" value="false" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true" />
+        <option name="NOTIFY_UNCAUGHT" value="true" />
+        <option name="ENABLED" value="false" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+    </breakpoint_any>
+    <breakpoint_rules />
+    <ui_properties />
+  </component>
+  <component name="ErrorTreeViewConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="HIDE_WARNINGS" value="false" />
+  </component>
+  <component name="FavoritesManager">
+    <favorites_list name="rest-tx" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf>
+      <file leaf-file-name="TMApplication.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="16" column="13" selection-start="607" selection-end="607" vertical-scroll-proportion="0.018248174">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="RESTRecord.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="122" column="31" selection-start="3485" selection-end="3485" vertical-scroll-proportion="0.01858736">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="AppTest.java" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/jbossts/rts/test/AppTest.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="205" column="43" selection-start="7283" selection-end="7283" vertical-scroll-proportion="0.3540146">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Participant.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/example/Participant.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="320" column="111" selection-start="12303" selection-end="12303" vertical-scroll-proportion="0.01858736">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Coordinator.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="233" column="25" selection-start="8468" selection-end="8479" vertical-scroll-proportion="0.018248174">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Transaction.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="68" column="0" selection-start="1628" selection-end="1628" vertical-scroll-proportion="0.018248174">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="TxUtil.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="210" column="57" selection-start="6824" selection-end="6824" vertical-scroll-proportion="0.018248174">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="TxTest.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/client/TxTest.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="48" column="15" selection-start="2037" selection-end="2037" vertical-scroll-proportion="0.45620438">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindManager">
+    <FindUsagesManager>
+      <setting name="OPEN_NEW_TAB" value="false" />
+    </FindUsagesManager>
+  </component>
+  <component name="HierarchyBrowserManager">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="SORT_ALPHABETICALLY" value="false" />
+    <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
+  </component>
+  <component name="ModuleEditorState">
+    <option name="LAST_EDITED_MODULE_NAME" />
+    <option name="LAST_EDITED_TAB_NAME" />
+  </component>
+  <component name="ProjectLevelVcsManager">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <OptionsSetting value="true" id="Undo Check Out" />
+    <OptionsSetting value="true" id="Get Latest Version" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
+  <component name="ProjectPane">
+    <subPane>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="&lt; 1.5 &gt;" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="&lt; 1.5 &gt;" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="&lt; 1.5 &gt;" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar!/java/net" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="&lt; 1.5 &gt;" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar!/java/lang/reflect" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="&lt; 1.5 &gt;" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/usr/jdk1.5.0_13/jre/lib/rt.jar!/java/lang" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="Libraries" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/jbossts/rts/test" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/webapp" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/webapp/WEB-INF" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/util" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/service" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/provider" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/example" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="rest-tx" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/client" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+    </subPane>
+  </component>
+  <component name="ProjectReloadState">
+    <option name="STATE" value="0" />
+  </component>
+  <component name="ProjectView">
+    <navigator currentView="ProjectPane" proportions="0.16666667" version="1" splitterProportion="0.5">
+      <flattenPackages ProjectPane="true" />
+      <showMembers />
+      <showModules />
+      <showLibraryContents />
+      <hideEmptyPackages />
+      <abbreviatePackageNames />
+      <showStructure ProjectPane="false" />
+      <autoscrollToSource ProjectPane="true" />
+      <autoscrollFromSource ProjectPane="true" />
+      <sortByType />
+    </navigator>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="GoToFile.includeJavaFiles" value="false" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web2" value="/tmp/webExplodedDir33255tmp" />
+    <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
+    <property name="MemberChooser.sorted" value="false" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web7" value="/tmp/webExplodedDir28503tmp" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web5" value="/tmp/webExplodedDir34947tmp" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web6" value="/tmp/webExplodedDir34948tmp" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web3" value="/tmp/webExplodedDir46730tmp" />
+    <property name="MemberChooser.copyJavadoc" value="false" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web4" value="/tmp/webExplodedDir515tmp" />
+    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web" value="/tmp/webExplodedDir33254tmp" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_rest-tx/web/Web14" value="/tmp/webExplodedDir59295tmp" />
+    <property name="MemberChooser.showClasses" value="true" />
+    <property name="GoToClass.includeLibraries" value="false" />
+    <property name="TEMP_MODULE_EXPLODED_DIR_FOR_jms-facade/web/Web" value="/tmp/webExplodedDir55044tmp" />
+  </component>
+  <component name="RecentsManager">
+    <key name="MoveMembersDialog.RECENTS_KEY">
+      <recent name="org.jboss.jbossts.rts.util.TxUtil" />
+    </key>
+    <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+      <recent name="org.jboss.jbossts.rtsx" />
+      <recent name="org.jboss.jbossts.rts" />
+      <recent name="org.jboss.resteasy.examples.service" />
+      <recent name="org.jboss.resteasy.examples.client" />
+    </key>
+  </component>
+  <component name="RunManager" selected="Remote.5001">
+    <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="" />
+      <envs />
+      <method>
+        <option name="Make" value="true" />
+      </method>
+    </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+      <envs />
+      <method>
+        <option name="Make" value="true" />
+      </method>
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="ANNOTATION_TYPE" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+      <option name="PROPERTIES_FILE" />
+      <envs />
+      <properties />
+      <listeners />
+      <method>
+        <option name="Make" value="true" />
+      </method>
+    </configuration>
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+    </configuration>
+    <configuration default="false" name="5001" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5001" />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="5001" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="false" />
+      </RunnerSettings>
+      <RunnerSettings RunnerId="JProfiler">
+        <option name="WINDOW" value="false" />
+        <option name="JVMPI" value="false" />
+        <option name="INTERPRETED" value="false" />
+      </RunnerSettings>
+      <ConfigurationWrapper RunnerId="Debug" />
+      <method>
+        <option name="Make" value="false" />
+      </method>
+    </configuration>
+    <configuration default="false" name="5006" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5006" />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="5006" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="false" />
+      </RunnerSettings>
+      <RunnerSettings RunnerId="JProfiler">
+        <option name="WINDOW" value="false" />
+        <option name="JVMPI" value="false" />
+        <option name="INTERPRETED" value="false" />
+      </RunnerSettings>
+      <ConfigurationWrapper RunnerId="Debug" />
+      <method>
+        <option name="Make" value="false" />
+      </method>
+    </configuration>
+    <list size="2">
+      <item index="0" class="java.lang.String" itemvalue="Remote.5001" />
+      <item index="1" class="java.lang.String" itemvalue="Remote.5006" />
+    </list>
+    <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
+      <Host>localhost</Host>
+      <Port>5050</Port>
+    </configuration>
+  </component>
+  <component name="StarteamConfiguration">
+    <option name="SERVER" value="" />
+    <option name="PORT" value="49201" />
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="PROJECT" value="" />
+    <option name="VIEW" value="" />
+    <option name="ALTERNATIVE_WORKING_PATH" value="" />
+    <option name="LOCK_ON_CHECKOUT" value="false" />
+    <option name="UNLOCK_ON_CHECKIN" value="false" />
+  </component>
+  <component name="StructureViewFactory">
+    <option name="AUTOSCROLL_MODE" value="true" />
+    <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+    <option name="ACTIVE_ACTIONS" value="" />
+  </component>
+  <component name="SvnConfiguration">
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="LAST_MERGED_REVISION" />
+    <option name="UPDATE_RUN_STATUS" value="false" />
+    <option name="UPDATE_RECURSIVELY" value="true" />
+    <option name="MERGE_DRY_RUN" value="false" />
+  </component>
+  <component name="TodoView" selected-index="0">
+    <todo-panel id="selected-file">
+      <are-packages-shown value="false" />
+      <are-modules-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+    <todo-panel id="all">
+      <are-packages-shown value="true" />
+      <are-modules-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+    <todo-panel id="default-changelist">
+      <are-packages-shown value="false" />
+      <are-modules-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="false" />
+    </todo-panel>
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="25" width="1680" height="1000" extended-state="0" />
+    <editor active="true" />
+    <layout>
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.37872764" order="1" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.38170975" order="3" />
+      <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32936978" order="8" />
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24984616" order="1" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
+      <window_info id="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+      <window_info id="JProfiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.328" order="0" />
+      <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
+      <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
+      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+      <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="4" />
+    </layout>
+  </component>
+  <component name="VcsManagerConfiguration">
+    <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+    <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
+    <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
+    <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+    <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+    <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+    <option name="LAST_COMMIT_MESSAGE" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+    <option name="ACTIVE_VCS_NAME" />
+    <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+    <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+  </component>
+  <component name="VssConfiguration">
+    <option name="CLIENT_PATH" value="" />
+    <option name="SRCSAFEINI_PATH" value="" />
+    <option name="USER_NAME" value="" />
+    <option name="PWD" value="" />
+    <CheckoutOptions>
+      <option name="COMMENT" value="" />
+      <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+      <option name="REPLACE_WRITABLE" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckoutOptions>
+    <CheckinOptions>
+      <option name="COMMENT" value="" />
+      <option name="KEEP_CHECKED_OUT" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckinOptions>
+    <AddOptions>
+      <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+      <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+    </AddOptions>
+    <UndocheckoutOptions>
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="REPLACE_LOCAL_COPY" value="2" />
+      <option name="RECURSIVE" value="false" />
+    </UndocheckoutOptions>
+    <GetOptions>
+      <option name="REPLACE_WRITABLE" value="0" />
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="ANSWER_NEGATIVELY" value="false" />
+      <option name="ANSWER_POSITIVELY" value="false" />
+      <option name="RECURSIVE" value="false" />
+      <option name="VERSION" />
+    </GetOptions>
+  </component>
+  <component name="antWorkspaceConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="FILTER_TARGETS" value="false" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseException.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="31" column="11" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar:///usr/jdk1.5.0_13/src.zip!/java/net/SocketInputStream.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="76" column="0" selection-start="2238" selection-end="2238" vertical-scroll-proportion="0.33202356">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file:///home/mmusgrov/source/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/Uid.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="92" column="11" selection-start="3476" selection-end="3476" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar:///usr/jdk1.5.0_13/src.zip!/java/lang/String.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="376" column="11" selection-start="14445" selection-end="14449" vertical-scroll-proportion="0.33272058">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar:///usr/jdk1.5.0_13/src.zip!/java/lang/CharSequence.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="91" column="14" selection-start="3580" selection-end="3580" vertical-scroll-proportion="0.7627416">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar:///usr/jdk1.5.0_13/src.zip!/java/lang/StringBuilder.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="163" column="38" selection-start="6062" selection-end="6062" vertical-scroll-proportion="0.21875">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/example/Work.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="69" column="0" selection-start="2198" selection-end="2198" vertical-scroll-proportion="0.01858736">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file:///home/mmusgrov/source/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="324" column="10" selection-start="16465" selection-end="16465" vertical-scroll-proportion="0.018939395">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="16" column="13" selection-start="607" selection-end="607" vertical-scroll-proportion="0.018248174">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="122" column="31" selection-start="3485" selection-end="3485" vertical-scroll-proportion="0.01858736">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/example/Participant.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="320" column="111" selection-start="12303" selection-end="12303" vertical-scroll-proportion="0.01858736">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="233" column="25" selection-start="8468" selection-end="8479" vertical-scroll-proportion="0.018248174">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="68" column="0" selection-start="1628" selection-end="1628" vertical-scroll-proportion="0.018248174">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="210" column="57" selection-start="6824" selection-end="6824" vertical-scroll-proportion="0.018248174">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/jbossts/rts/client/TxTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="48" column="15" selection-start="2037" selection-end="2037" vertical-scroll-proportion="0.45620438">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/jbossts/rts/test/AppTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="205" column="43" selection-start="7283" selection-end="7283" vertical-scroll-proportion="0.3540146">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>
+

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/client/TxTest.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/client/TxTest.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/client/TxTest.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.client;
+
+import org.jboss.resteasy.util.HttpResponseCodes;
+import org.jboss.jbossts.rts.util.TxUtil;
+import org.apache.log4j.Logger;
+
+import java.io.IOException;
+
+/**
+ * Basic remote test. @see org.jboss.jbossts.rts.test.AppTest for more tests
+ */
+public class TxTest
+{
+    protected final static Logger log = Logger.getLogger(TxTest.class);
+
+    public static void main(String[] args) throws IOException
+    {
+        log.info("Base URI: " + TxUtil.getBaseURI());
+        String query = "clientId=12345&timeout=0";
+        String participant = TxUtil.getBaseURI() + "participant/work/pid1";
+        // start a transaction
+        String tx = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, TxUtil.txURI + "/begin?" + query);
+
+        // modify a resource (the example participant has been written such taht is will enlist itself with the transaction
+        TxUtil.doPost(new int[] {HttpResponseCodes.SC_OK}, participant,
+                "name=p1", "value=v1", "context=" + tx);
+
+        // commit the changes
+        TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, tx + "/commit", "", "fault=none");
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Participant.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Participant.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Participant.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,373 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.example;
+
+import org.jboss.jbossts.rts.provider.TMUnavailableException;
+import org.jboss.jbossts.rts.provider.HttpResponseException;
+import org.jboss.jbossts.rts.provider.TransactionStatusException;
+import org.jboss.jbossts.rts.util.TxUtil;
+import org.jboss.jbossts.rts.service.*;
+import org.jboss.resteasy.util.HttpResponseCodes;
+import org.apache.log4j.Logger;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+import java.util.*;
+
+/**
+ * Participants are responsible for doing work on real resources and for obeying a 2PC protocol.
+ * The interface is defined by TransactionalParticipant.
+ * Participant URLs are unique for each transaction but is unconstrained. To satisfy this restriction
+ * we choose encode the transaction id into the url:
+ *         participant{pId}/tx/{tid}
+ * where pId is a participant id and tid is the transaction id (actually only tid would do).
+ */
+ at Path("/participant")
+public class Participant //implements TransactionalParticipant
+{
+    protected final static Logger log = Logger.getLogger(Participant.class);
+
+    /*
+     * Define methods for spec conformance
+     */
+
+    /**
+     * Performing a GET on the participant URL will return the current status
+     * of the participant, or 404 if the participant is no longer present.
+     */
+    @GET
+    @Path("{pId}/tx/{tid}/{status}")
+    public Response getStatus(@PathParam("pId")String pid,
+                              @PathParam("tid") @DefaultValue("")String tid,
+                              @PathParam("status") String status)
+    {
+        log.trace("particpant: status: " + pid + "/tx/" + tid);
+        return  TxUtil.response(
+            TxUtil.getBaseURI() + getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid).getStatus());
+    }
+
+    /**
+     * Performing a POST on <P-URL>/prepare causes the participant to prepare
+     * the (implicitly) associated transaction. It returns a URL if
+     * successful, which indicates the outcome. That URL can be probed (via
+     * GET see getStatus()) and will simply return the same (implicit) information:
+     *
+     * <P-URL>/prepare-ok
+     * <P-URL>/prepare-readonly
+     * <P-URL>/prepare-notok
+     */
+    @POST
+    @Path("{pId}/tx/{tid}/prepare/")
+    public Response prepare(@PathParam("pId")String pid,
+                               @PathParam("tid") @DefaultValue("")String tid)
+    {
+        log.debug("particpant: prepare: " + pid + "/tx/" + tid + "/prepare");
+        return TxUtil.postResponse(getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid).prepare());
+    }
+    @GET
+    @Path("{pId}/tx/{tid}/prepare/")
+    public Response getPrepare(@PathParam("pId")String pid,
+                               @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_NOT_FOUND);
+    }
+    @PUT
+    @Path("{pId}/tx/{tid}/prepare/")
+    public Response putPrepare(@PathParam("pId")String pid,
+                               @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED);
+    }
+
+    /**
+     * Performing a POST on <P-URL>/commit will cause the participant to commit
+     * on behalf of the transaction. It will return a URL if successful, which
+     * indicates the outcome. That URL can be probed (via GET) and will simply
+     * return the same (implicit) information:
+     *
+     * <P-URL>/committed
+     * <P-URL>/rolledback
+     * <P-URL>/heuristic
+     */
+    @POST
+    @Path("{pId}/tx/{tid}/commit/")
+    public Response commit(@PathParam("pId")String pid,
+                           @PathParam("tid") @DefaultValue("")String tid)
+    {
+        log.debug("particpant: commit: " + pid + "/tx/" + tid + "/commit");
+
+        if (tid == null)
+            throw new TransactionStatusException("no transaction");
+
+	// get the work done on the resource in this transaction
+        Work w = getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid);
+
+	// and update the original resource with the changes
+        return TxUtil.postResponse(w.commit(getWork(0, pid, "")));
+    }
+    @GET
+    @Path("{pId}/tx/{tid}/commit/")
+    public Response getCommit(@PathParam("pId")String pid,
+                              @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_NOT_FOUND);
+    }
+    @PUT
+    @Path("{pId}/tx/{tid}/commit/")
+    public Response putCommit(@PathParam("pId")String pid,
+                              @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED);
+    }
+
+    /**
+     * Performing a POST on <P-URL>/commit will cause the participant to commit
+     * on behalf of the transaction. It will return a URL if successful, which
+     * indicates the outcome. That URL can be probed (via GET) and will simply
+     * return the same (implicit) information:
+     *
+     * <P-URL>/committed
+     * <P-URL>/rolledback
+     * <P-URL>/heuristic<blah>
+     *
+     */
+    @POST
+    @Path("{pId}/tx/{tid}/rollback/")
+    public Response rollback(@PathParam("pId")String pid,
+                             @PathParam("tid") @DefaultValue("")String tid)
+    {
+        log.debug("particpant: rollback: " + pid + "/tx/" + tid + "/rollback");
+        return TxUtil.postResponse(getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid).rollback());
+    }
+    @GET
+    @Path("{pId}/tx/{tid}/rollback/")
+    public Response getRollback(@PathParam("pId")String pid,
+                                @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_NOT_FOUND);
+    }
+    @PUT
+    @Path("{pId}/tx/{tid}/rollback/")
+    public Response putRollback(@PathParam("pId")String pid,
+                                @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED);
+    }
+
+    /**
+     * Performing a POST on <P-URL>/forget will cause the participant to forget
+     * any heuristic decision it made on behalf of the transaction.
+     */
+    @POST
+    @Path("{pId}/tx/{tid}/forget/")
+    public Response forget(@PathParam("pId")String pid,
+                           @PathParam("tid") @DefaultValue("")String tid)
+    {
+        log.debug("POST: particpant: forget: " + pid + "/tx/" + tid + "/forget");
+        return TxUtil.postResponse(getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid).forget());
+    }
+
+    /**
+     * Performing a GET on <P-URL>/forget will return an indication of the
+     * heuristic if it still exists, or 404 if it does not.
+     */
+    @GET
+    @Path("{pId}/tx/{tid}/forget/")
+    public Response getForget(@PathParam("pId")String pid,
+                              @PathParam("tid") @DefaultValue("")String tid)
+    {
+        log.debug("GET: particpant: forget: " + pid + "/tx/" + tid + "/forget");
+        Work w = getWork(HttpResponseCodes.SC_NOT_FOUND, pid, TxUtil.txURI + "/" + tid);
+
+        if (w == null || w.getStatus() != Work.HEURISTIC)
+                return TxUtil.response(HttpResponseCodes.SC_NOT_FOUND); 
+
+        return getStatus(pid, tid, null);
+    }
+    @PUT
+    @Path("{pId}/tx/{tid}/forget/")
+    public Response putForget(@PathParam("pId")String pid,
+                              @PathParam("tid") @DefaultValue("")String tid)
+    {
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED ); 
+    }
+
+    /*
+     * Now define some resources specific to the example - namely urls
+     * for retrieving and modifying the resource
+     * 
+     * These methods are for simulating real resources to test that the 
+     * protocol is implemented correctly
+     */
+
+    @POST
+    @Path("work/{pId}")
+    public String modifyResource(@PathParam("pId")String pid,
+                                 @QueryParam("context") @DefaultValue("")String ctx,
+                                 @QueryParam("name") String name,
+                                 @QueryParam("value") String value,
+                                 @QueryParam("fault") String fault)
+    {
+        log.trace("particpant: modify " + pid + " ctx: " + ctx + " fault: " + fault);
+        getWork(0, pid, ctx).put(name, value);
+        
+        if (fault != null)
+            getWork(0, pid, ctx).put("fault", fault);
+
+        return value;
+    }
+
+    @GET
+    @Path("work/{pId}")
+    public Response getResource(@PathParam("pId")String pid,
+                                @QueryParam("name") String name,
+                                @QueryParam("context") @DefaultValue("") String ctx)
+    {
+        log.trace("particpant: get: work/" + pid + " - ctx: " + ctx);
+        return TxUtil.response(getWork(0, pid, ctx).get(name));
+    }
+
+    void removeParticipant(Work w)
+    {
+        work.remove(w.getId());
+    }
+
+    /**
+     * Tell the recovery sub-system that this participant has moved
+     */ 
+    void moveParticipant(Work w, String newUrl)
+    {
+        log.trace("particpant: moving participant " + w.pid + " to " + newUrl);
+        Work newWork = new Work(w);
+
+        work.remove(w.getId());
+        newWork.pid = "p99";
+        String url = makeParticipantUrl(newWork);
+
+        // remove context from old work
+        w.ctx = null;
+
+        String id = newWork.ctx == null ? newWork.pid : newWork.pid + newWork.ctx;
+        work.put(id, newWork);
+
+        try
+        {
+            TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, TxUtil.rcURI + "/" + w.recCoordId, url, "URL=" + url);
+        }
+        catch (HttpResponseException e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+    private String makeParticipantUrl(Work w)
+    {
+        // use the same server as the coordinator TODO make this configurable       
+        return TxUtil.getBaseURI() + new StringBuilder("participant/").append(w.pid).append("/tx/").append(w.ctx).toString().replaceAll("//", "/");
+    }
+
+    /**
+     * Get the work done by this participant on behalf of the given transaction
+     * If the work does not exist and the parameter statusCode is 0 then one is created
+     * otherwise an HttpResponseException is thrown filled in with the value of statusCode.
+     * The thrown exception will be mapped back to the required HTTP status code by the JAX RS
+     * implementation.
+     */
+    private Work getWork(int statusCode, String pid, String ctx) throws HttpResponseException
+    {
+        assert ctx != null;
+        assert pid != null;
+        log.trace("getWork(" + pid + ", " + ctx + ')');
+        int i = ctx.indexOf(TxUtil.txURI);
+        if (i == -1 || i + TxUtil.txURI.length() == ctx.length())
+            ctx = "";
+        else
+            ctx = ctx.substring(i + TxUtil.txURI.length());
+
+        String id = pid + ctx;
+        Work w = work.get(id);
+
+        if (w == null)
+        {
+            if (statusCode != 0)
+                throw new HttpResponseException(HttpResponseCodes.SC_OK, statusCode);
+
+            w = new Work(this, pid, ctx);
+
+            if (ctx.length() != 0)
+            {
+                try
+                {
+                    // enlist as a participant in this transaction context
+                    String pUrl = makeParticipantUrl(w);
+                    w.recCoordId = TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, TxUtil.txURI + ctx, pUrl, "URL=" + pUrl);
+                }
+                catch (HttpResponseException e)
+                {
+                    throw new TMUnavailableException("Unable to contact TM: " + e.getMessage());
+                }
+                catch (Throwable t) {
+                    log.info("don't know what this is");
+                }
+            }
+
+            work.put(id, w);
+        }
+
+        return w;
+    }
+
+    public Participant()
+    {
+        /*
+         * We want to remove completed work. We could remove it immediately but the spec says that status
+         * urls can be probed (for an indeterminate period of time). So leave completed participants lying
+         * around for a limited period before culling them.
+         */
+        timer = new Timer();
+
+        int delay = 5000;   // delay for 5 sec.
+        int period = 1000;  // repeat every sec.
+        Timer timer = new Timer();
+
+        timer.scheduleAtFixedRate(new TimerTask() {
+            public void run() {
+                Iterator<String> keys = work.keySet().iterator();
+
+                while (keys.hasNext())
+                {
+                    String key = keys.next();
+                    if (work.get(key).isComplete())
+                        keys.remove();
+                }
+            }
+        }, delay, period);
+    }
+
+    protected void finalize() throws Throwable
+    {
+        super.finalize();
+        timer.cancel();
+    }
+
+    private Map<String, Work> work = new HashMap<String, Work>();
+    private Timer timer;    
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Work.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Work.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/example/Work.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.example;
+
+import org.jboss.jbossts.rts.provider.TransactionStatusException;
+import org.jboss.jbossts.rts.provider.ResourceNotFoundException;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Holder for isolating work done by participants from each other
+ * Simulate work done inside a transaction. Its only purpose is to
+ * show that work:
+ * - can be isolated from other work;
+ * - that is committed really does create new state;
+ * - that is rolled back really does abort any changes;
+ */
+public class Work
+{
+    String pid;
+    String ctx;
+    String recCoordId;
+    Participant bean;
+    String status;
+    Map<String, String> properties = new HashMap<String, String>();
+
+    public Work(Participant bean, String pid, String ctx)
+    {
+        this.pid = pid;
+        this.ctx = ctx;
+        this.bean = bean;
+    }
+
+    public Work(Work w)
+    {
+        this.pid = w.pid;
+        this.ctx = w.ctx;
+        this.recCoordId = w.recCoordId;
+        this.status = w.status;
+        this.bean = w.bean;
+        properties.putAll(w.properties);
+    }
+
+    public boolean isReadonly()
+    {
+        return properties.size() == 0;
+    }
+
+    public void put(String name, String value)
+    {
+        properties.put(name, value);
+    }
+
+    public String get(String name)
+    {
+        return properties.get(name);
+    }
+
+    public String getStatus()
+    {
+        return "participant/" + pid + "/tx" + ctx + '/' + status;
+    }
+
+    public String setStatus(String status)
+    {
+        this.status = status;
+
+        return getStatus();
+    }
+
+    public String prepare()
+    {
+        validateRequest(true);
+        
+        return setStatus(isReadonly() ? PREPARE_RO : PREPARE_OK); // prepare-notok
+    }
+
+    static final String PREPARE_OK = "prepare-ok";
+    static final String PREPARE_RO = "prepare-readonly";
+    static final String ROLLEDBACK = "rolledback";
+    static final String COMMIT_OK = "commit-ok";
+    static final String HEURISTIC = "heuristic";
+
+    /**
+     * This method enables the tests to validate that any new state was
+     * aborted.
+     */
+    public String rollback()
+    {
+        validateRequest(false);
+        bean.removeParticipant(this);
+
+        return setStatus(ROLLEDBACK); // heuristic
+    }
+
+    /**
+     * This work can now be made persistent so update the original work
+     * (identified by mergeTo) with the contents of this work.
+     *
+     * This method enables the tests to validate that any new state was
+     * committed.
+     */
+    public String commit(Work mergeTo)
+    {
+        validateRequest(false);
+
+        for (Map.Entry<String, String> e : mergeTo.properties.entrySet())
+            mergeTo.put(e.getKey(), e.getValue());
+
+        bean.removeParticipant(this);
+
+        return setStatus(COMMIT_OK); // or rolledback or heuristic
+    }
+
+    public String forget()
+    {
+        validateRequest(false);
+        bean.removeParticipant(this);
+
+        return getStatus();
+    }
+
+    private void validateRequest(boolean prepare)
+    {
+        if (ctx == null)
+            throw new TransactionStatusException("no transaction");
+
+        String fault = properties.get("fault");
+
+        if ((prepare && "prepare_fail".equals(fault)) || (!prepare && "commit_fail".equals(fault)))
+            throw new ResourceNotFoundException("Simulated failure");
+        else if ((prepare && "prepare_halt".equals(fault)) || (!prepare && "commit_halt".equals(fault)))
+            Runtime.getRuntime().halt(1);
+
+        if (prepare && fault != null && fault.startsWith("move_to"))
+            bean.moveParticipant(this, fault);
+    }
+
+    public boolean isComplete()
+    {
+        return COMMIT_OK.equals(status) || ROLLEDBACK.equals(status);
+    }
+
+    public String getId()
+    {
+        return ctx == null ? pid : pid + ctx;
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseException.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseException.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseException.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+/**
+ * Exception for wrapping unexpected http response codes
+ */
+public class HttpResponseException extends Error
+{
+    private int expectedResponse;
+    private int actualResponse;
+    private String body;
+
+    public HttpResponseException(Throwable cause, String body, int expectedResponse, int actualResponse)
+    {
+        super(cause);
+        this.body = body;
+        this.expectedResponse = expectedResponse;
+        this.actualResponse = actualResponse;
+    }
+
+    public HttpResponseException(int expectedResponse, int actualResponse)
+    {
+        this(null, null, expectedResponse, actualResponse);
+    }
+
+    public int getExpectedResponse()
+    {
+        return expectedResponse;
+    }
+
+    public int getActualResponse()
+    {
+        return actualResponse;
+    }
+
+    public String getBody()
+    {
+        return body;
+    }
+
+    public String getMessage()
+    {
+        if (getCause() != null)
+            return super.getMessage();
+
+        if (expectedResponse != actualResponse)
+            return "Unexpected status. Expected " +  expectedResponse + " got " + actualResponse;
+
+        throw new Error("Invalid HttpResponseException thrown - there's no error and status is fine");
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseMapper.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/HttpResponseMapper.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.provider;
+
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.core.Response;
+
+/**
+ * Maps an HttpResponseException to the HTTP code embedded in the exception
+ */
+ at Provider
+public class HttpResponseMapper implements ExceptionMapper<HttpResponseException>
+{
+   public Response toResponse(HttpResponseException exception)
+   {
+      return Response.status(exception.getActualResponse()).build();
+   }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/NotFoundMapper.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/NotFoundMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/NotFoundMapper.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.core.Response;
+
+/**
+ * 404 mapper
+ */
+ at Provider
+public class NotFoundMapper implements ExceptionMapper<ResourceNotFoundException>
+{
+   public Response toResponse(ResourceNotFoundException exception)
+   {
+      return Response.status(HttpResponseCodes.SC_NOT_FOUND).build();
+   }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/ResourceNotFoundException.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/ResourceNotFoundException.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/ResourceNotFoundException.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+/**
+ * 404 exception
+ */
+public class ResourceNotFoundException extends RuntimeException
+{
+
+    public ResourceNotFoundException(String message)
+    {
+        super(message);
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableException.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableException.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableException.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+/**
+ * Unable to contact the REST based Transaction Coordinator
+ */
+public class TMUnavailableException extends RuntimeException
+{
+    public TMUnavailableException(String message)
+    {
+        super(message);
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableMapper.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TMUnavailableMapper.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.provider;
+
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.core.Response;
+
+/**
+ * Map service unavailable exceptions
+ */
+ at Provider
+public class TMUnavailableMapper implements ExceptionMapper<TMUnavailableException>
+{
+   public Response toResponse(TMUnavailableException exception)
+   {
+      return Response.status(HttpResponseCodes.SC_SERVICE_UNAVAILABLE).build();
+   }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusException.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusException.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusException.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+/**
+ * transaction status exception
+ */
+public class TransactionStatusException extends RuntimeException
+{
+    public TransactionStatusException(String message)
+    {
+        super(message);
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusMapper.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/provider/TransactionStatusMapper.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.provider;
+
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.core.Response;
+
+/**
+ * map transaction status exceptions
+ */
+ at Provider
+public class TransactionStatusMapper implements ExceptionMapper<TransactionStatusException>
+{
+   public Response toResponse(TransactionStatusException exception)
+   {
+      return Response.status(HttpResponseCodes.SC_CONFLICT).build();
+   }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecord.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,386 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.resource;
+
+import com.arjuna.ats.arjuna.coordinator.AbstractRecord;
+import com.arjuna.ats.arjuna.coordinator.RecordType;
+import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.ObjectType;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.gandiva.ClassName;
+
+import org.jboss.jbossts.rts.util.TxUtil;
+import org.jboss.jbossts.rts.provider.HttpResponseException;
+import org.jboss.resteasy.util.HttpResponseCodes;
+import org.apache.log4j.Logger;
+
+/**
+ * Log record for driving participants through 2PC and recoverery
+ */
+public class RESTRecord extends AbstractRecord
+{
+    protected final static Logger log = Logger.getLogger(RESTRecord.class);
+    private String url;
+    private String coordinatorID;
+    private String statusUrl = "";
+    private String txId;
+    private boolean prepared;
+
+    public RESTRecord(String url, String txId)
+    {
+        super(new Uid());
+        log.trace("RESTRecord url: " + url + " tx: " + txId);
+        this.url = url;
+        this.txId = txId;
+        coordinatorID = get_uid().fileStringForm();
+    }
+
+    public static AbstractRecord create()
+    {
+        log.trace("RESTRecord.create");
+        return new RESTRecord();
+    }
+    public RESTRecord()
+    {
+        super();
+        log.trace("RESTRecord()");
+    }
+
+    protected RESTRecord(Uid u)
+    {
+        super(u, null, ObjectType.ANDPERSISTENT);
+    }
+
+    public int typeIs()
+    {
+        return RecordType.USER_DEF_FIRST0;
+    }
+
+    public ClassName className()
+    {
+        return new ClassName("RecordType.USER_DEF_FIRST0");
+    }
+
+    public Object value()
+    {
+        return statusUrl;
+    }
+
+    public void setValue(Object o)
+    {
+    }
+
+    public int nestedAbort()
+    {
+        return TwoPhaseOutcome.FINISH_OK;
+    }
+
+    public int nestedCommit()
+    {
+        return TwoPhaseOutcome.FINISH_OK;
+    }
+
+    /*
+    * Not subtransaction aware.
+    */
+    public int nestedPrepare()
+    {
+        return TwoPhaseOutcome.PREPARE_OK; // do nothing
+    }
+
+    public int topLevelPrepare()
+    {
+        log.debug("prepare " + url);
+
+        if (fault.equals(Fault.prepare_halt)) {
+            log.info("prepare: halt VM");
+            Runtime.getRuntime().halt(1);
+        }
+        
+        if (fault.equals(Fault.h_hazard))
+            return TwoPhaseOutcome.HEURISTIC_HAZARD;
+
+        if (url == null || txId == null)
+            return TwoPhaseOutcome.PREPARE_READONLY;
+
+        try
+        {
+            String txUrl = TxUtil.txURI + '/' + txId;
+            this.statusUrl = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, url + "/prepare", "context=" + txUrl);
+
+            prepared = true;
+            return TwoPhaseOutcome.PREPARE_OK;
+        }
+        catch (HttpResponseException e)
+        {
+            log.info("participant " + url + " prepare error: " + e.getMessage());
+            statusUrl = this.url + "/prepare-notok";
+
+            return TwoPhaseOutcome.PREPARE_NOTOK;
+        }
+    }
+
+    public int topLevelAbort()
+    {
+        log.debug("abort " + url);
+
+        if (fault.equals(Fault.abort_halt)) {
+            log.info("abort: halt VM");
+            Runtime.getRuntime().halt(1);
+        }
+
+        if (url == null || txId == null)
+            return TwoPhaseOutcome.FINISH_ERROR;
+
+        try {
+            statusUrl = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, this.url + "/rollback");
+
+            return TwoPhaseOutcome.FINISH_OK;
+        } catch (HttpResponseException e) {
+            if (log.isInfoEnabled())
+                log.info("participant " + this.url + " rollback error: " + e.getMessage());
+            this.statusUrl = this.url + "/heuristic"; // don't know what status the participant is in
+
+            return TwoPhaseOutcome.FINISH_ERROR;
+        }
+    }
+
+    public int topLevelCommit()
+    {
+        log.debug("commit " + url);
+
+        if (url == null || txId == null)
+            return TwoPhaseOutcome.PREPARE_READONLY;
+
+        if (!prepared)
+            return TwoPhaseOutcome.NOT_PREPARED;
+
+        return topLevelOnePhaseCommit();
+    }
+
+    public int nestedOnePhaseCommit()
+    {
+        return TwoPhaseOutcome.FINISH_ERROR;
+    }
+
+    /**
+     * For commit_one_phase we can do whatever we want since the transaction
+     * outcome is whatever we want. Therefore, we do not need to save any
+     * additional recoverable state, such as a reference to the transaction
+     * coordinator, since it will not have an intentions list anyway.
+     */
+
+    public int topLevelOnePhaseCommit()
+    {
+        if (fault.equals(Fault.commit_halt)) {
+            log.info("commit: halt VM");
+            Runtime.getRuntime().halt(1);
+        }
+
+        if (fault.equals(Fault.commit_suspend)) {
+            try
+            {
+                Thread.sleep(10000);
+            }
+            catch (InterruptedException e)
+            {
+                e.printStackTrace();
+            }
+        }
+ 
+        if (txId == null)
+            return TwoPhaseOutcome.FINISH_ERROR;
+
+//        String txUrl = TxUtil.TX_URI_PREFIX + '/' + txId;
+
+        try
+        {
+            if (log.isDebugEnabled()) log.debug("commiting " + this.url);
+            if (!statusUrl.endsWith("prepare-readonly"))
+                statusUrl = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, this.url + "/commit"); //, "context=" + txUrl));
+
+            return TwoPhaseOutcome.FINISH_OK;
+        }
+        catch (HttpResponseException e)
+        {
+            if (e.getActualResponse() == HttpResponseCodes.SC_NOT_FOUND)
+            {
+                // the participant may have moved so check the coordinator url
+                if (hasParticpantMoved())
+                {
+                    if (log.isDebugEnabled())
+                        log.debug("participant has moved commit to new url " + this.url);
+                    try
+                    {
+                        this.statusUrl = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, this.url + "/commit"); //, "context=" + txUrl));
+
+                        return TwoPhaseOutcome.FINISH_OK;
+                    }
+                    catch (HttpResponseException e1)
+                    {
+                        e = e1;
+                    }
+                }
+            }
+
+            if (log.isInfoEnabled())
+                log.debug("participant " + this.url + " commit error: " + e.getMessage());
+            this.statusUrl = this.url + "/commit-notok";
+
+            return TwoPhaseOutcome.FINISH_ERROR;
+        }
+    }
+
+    /**
+     * A participant tells the coordinator if it changes its URL.
+     * To see if this has happened perform a GET on the recovery url which returns the
+     * last known location of the participant.
+     */
+    private boolean hasParticpantMoved()
+    {
+        try
+        {
+            if (log.isDebugEnabled())
+                log.trace("seeing if participant has moved: " + TxUtil.getBaseURI() + "recovery-coordinator/" + coordinatorID);
+
+            // get the latest participant url by probing the recovery url:
+            String url = TxUtil.doGet(new int[] {HttpResponseCodes.SC_OK}, TxUtil.getBaseURI() + "recovery-coordinator/" + coordinatorID);
+
+            if (url != null && !url.equals(this.url))
+            {
+                // participant has moved so remember the new location
+                this.url = url;
+
+            	if (log.isDebugEnabled())
+                	log.trace("\tnew url is " + url);
+                return true;
+            }
+        }
+        catch (HttpResponseException e)
+        {
+        }
+
+        return false;
+    }
+
+    public boolean save_state(OutputObjectState os, int t)
+    {
+        try
+        {
+            os.packString(txId);
+            os.packBoolean(prepared);
+            os.packString(url);
+            os.packString(coordinatorID);
+            os.packString(statusUrl);
+
+            return super.save_state(os, t);
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+
+            return false;
+        }
+    }
+
+    public boolean restore_state(InputObjectState os, int t)
+    {
+        try
+        {
+            txId = os.unpackString();
+            prepared = os.unpackBoolean();
+            url = os.unpackString();
+            coordinatorID = os.unpackString();
+            statusUrl = os.unpackString();
+            log.info("restore_state " + url);
+
+            return super.restore_state(os, t);
+        }
+        catch (Exception e)
+        {
+            return false;
+        }
+    }
+
+    public String type()
+    {
+        return RESTRecord.typeName();
+    }
+
+    public static String typeName()
+    {
+        return "/StateManager/AbstractRecord/RESTRecord";
+    }
+
+    public boolean doSave()
+    {
+        return true;
+    }
+
+    public void merge(AbstractRecord a)
+    {
+    }
+
+    public void alter(AbstractRecord a)
+    {
+    }
+
+    public boolean shouldAdd(AbstractRecord a)
+    {
+        return (a.typeIs() == typeIs());
+    }
+
+    public boolean shouldAlter(AbstractRecord a)
+    {
+        return false;
+    }
+
+    public boolean shouldMerge(AbstractRecord a)
+    {
+        return false;
+    }
+
+    public boolean shouldReplace(AbstractRecord a)
+    {
+        return false;
+    }
+
+    enum Fault {abort_halt, prepare_halt, commit_halt, commit_suspend, h_commit, h_rollback, h_hazard, h_mixed, none}
+    Fault fault = Fault.none;
+
+    public void setFault(String name)
+    {
+        for (Fault f : Fault.values())
+        {
+            if (f.name().equals(name))
+            {
+                log.trace("setFault: " + f + " url: " + url);
+
+                fault = f;
+                return;
+            }
+        }
+
+        fault = Fault.none;
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecordSetup.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecordSetup.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/RESTRecordSetup.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+ package org.jboss.jbossts.rts.resource;
+
+import com.arjuna.ats.arjuna.gandiva.inventory.InventoryElement;
+import com.arjuna.ats.arjuna.gandiva.ClassName;
+import com.arjuna.ats.arjuna.gandiva.ObjectName;
+
+/**
+ * Setup for RESTRecord
+ */
+public class RESTRecordSetup implements InventoryElement
+{
+    public Object createVoid()
+    {
+        return RESTRecord.create();
+    }
+
+    public Object createClassName(ClassName className)
+    {
+        return null;
+    }
+
+    public Object createObjectName(ObjectName objectName)
+    {
+        return null;
+    }
+
+    public Object createResources(Object[] resources)
+    {
+        return null;
+    }
+
+    public Object createClassNameResources(ClassName className, Object[] resources)
+    {
+        return null;
+    }
+
+    public Object createObjectNameResources(ObjectName objectName, Object[] resources)
+    {
+        return null;
+    }
+
+    public ClassName className()
+    {
+        return new ClassName("RecordType.USER_DEF_FIRST0");
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/Transaction.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,144 @@
+package org.jboss.jbossts.rts.resource;
+
+import com.arjuna.ats.arjuna.coordinator.ActionStatus;
+import com.arjuna.ats.arjuna.coordinator.AbstractRecord;
+import com.arjuna.ats.arjuna.coordinator.AddOutcome;
+import com.arjuna.ats.arjuna.AtomicAction;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+ at XmlRootElement(name = "transaction")
+public class Transaction extends AtomicAction
+{
+    private long age = System.currentTimeMillis();
+    private String initiator;
+
+    public Transaction()
+    {
+        super();
+    }
+
+    public Transaction(String initiator)
+    {
+        super();
+        this.initiator = initiator;
+    }
+
+    @XmlElement
+    public String getInitiator()
+    {
+        return initiator;
+    }
+
+    @XmlElement
+    public String getAge()
+    {
+        return Long.toString(System.currentTimeMillis() - age);
+    }
+
+    @XmlAttribute
+    public String getStatus()
+    {
+        return ActionStatus.stringForm(super.status());
+    }
+
+    public String enlistParticipant(String url)
+    {
+        RESTRecord p = new RESTRecord(url, get_uid().fileStringForm());
+        String coordinatorId = p.get_uid().fileStringForm();
+        
+        if (add(p) != AddOutcome.AR_REJECTED)
+            return coordinatorId;
+
+        return null;
+    }
+
+    public void setFault(String fault)
+    {
+        if (pendingList == null)
+            return;
+
+        // only add faults for pending records
+        AbstractRecord r = pendingList.peekFront();
+
+        while (r != null)
+        {
+            if (r instanceof RESTRecord)
+                ((RESTRecord) r).setFault(fault);
+
+            r = pendingList.peekNext(r);
+        }
+    }
+
+    public boolean isTransactionInMidFlight()
+    {
+        switch ( status() )
+        {
+            case ActionStatus.RUNNING    :
+            case ActionStatus.ABORT_ONLY :
+            case ActionStatus.PREPARING  :
+            case ActionStatus.COMMITTING :
+            case ActionStatus.ABORTING   :
+            case ActionStatus.PREPARED   :
+                return true;
+
+                //case ActionStatus.INVALID:
+            default:
+                return false;
+        }
+//        return !isFinished();
+    }
+
+    public boolean isFinished()
+    {
+        switch ( status() )
+        {
+            case ActionStatus.COMMITTED  :
+            case ActionStatus.H_COMMIT   :
+            case ActionStatus.H_MIXED    :
+            case ActionStatus.H_HAZARD   :
+            case ActionStatus.ABORTED    :
+            case ActionStatus.H_ROLLBACK :
+                return true;
+
+                //case ActionStatus.INVALID: throw ...
+            default:
+                return false;
+        }
+    }
+
+    public boolean isAlive()
+    {
+        switch ( status() )
+        {
+            case ActionStatus.RUNNING    :
+            case ActionStatus.ABORT_ONLY :
+            case ActionStatus.PREPARING  :
+            case ActionStatus.COMMITTING :
+            case ActionStatus.ABORTING   :
+            case ActionStatus.PREPARED   :
+                return true;
+
+                //case ActionStatus.INVALID:
+            default:
+                return false;
+        }
+    }
+
+    public boolean hasHeuristic()
+    {
+        switch ( status() )
+        {
+            case ActionStatus.H_COMMIT   :
+            case ActionStatus.H_MIXED    :
+            case ActionStatus.H_HAZARD   :
+            case ActionStatus.H_ROLLBACK :
+                return true;
+
+            default:
+                return false;
+        }
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/TransactionList.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/TransactionList.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/resource/TransactionList.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.resource;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+import java.util.List;
+
+ at XmlRootElement(name="listing")
+public class TransactionList
+{
+   private List<Transaction> transactions;
+
+   public TransactionList()
+   {
+   }
+
+   public TransactionList(List<Transaction> transactions)
+   {
+      this.transactions = transactions;
+   }
+
+   @XmlElement(name="transactions")
+   public List<Transaction> getTransactions()
+   {
+      return transactions;
+   }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/Coordinator.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,357 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.service;
+
+import org.jboss.jbossts.rts.resource.TransactionList;
+import org.jboss.jbossts.rts.resource.Transaction;
+import org.jboss.jbossts.rts.provider.ResourceNotFoundException;
+import org.jboss.jbossts.rts.provider.TransactionStatusException;
+import org.jboss.jbossts.rts.util.TxUtil;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.log4j.Logger;
+
+import com.arjuna.ats.arjuna.coordinator.ActionStatus;
+import com.arjuna.ats.arjuna.AtomicAction;
+import com.arjuna.ats.arjuna.common.Uid;
+
+ at Path("/")
+public class Coordinator
+{
+    protected final static Logger log = Logger.getLogger(Coordinator.class);
+
+    private HashMap<String, Transaction> transactions = new HashMap<String, Transaction>();
+    // each participant may only be enlisted in one transaction
+    private HashMap<String, String> participants = new HashMap<String, String>();
+
+    /**
+     * Performing a GET on /transaction-coordinator returns a list of all transactions know to
+     * the coordinator (active and recovery).
+     * @return list of all transactions know to the coordinator (active and recovery).
+     */
+    @GET
+    @Path("transaction-coordinator")
+    @Produces("application/json")
+    public TransactionList getAllTransactions()
+    {
+        log.trace("coordinator: list: transaction-coordinator");
+        return getTransactions(null);
+    }
+
+    /**
+     * Lookup the status of a single transaction.
+     * @param id the transaction id
+     * @return a list of transactions containing the status of the requested item
+     *  (which will be empty if the tx does not exist)
+     */
+    @GET
+    @Path("transaction-coordinator/{id}")
+    @Produces("application/json")
+    public TransactionList getTransactionStatus(@PathParam("id") String id)
+    {
+        log.trace("coordinator: status: transaction-coordinator/" + id);
+        final Uid uid = new Uid(id);
+        TransactionFilter statusFilter = new TransactionFilter() {
+            public boolean accept(Transaction t)
+            {
+                return uid.equals(t.get_uid());
+            }
+        };
+
+        return getTransactions(statusFilter);
+    }
+
+    @GET
+    @Path("transaction-coordinator.html")
+    @Produces("text/html")
+    public Response getAllTransactionsText() throws Exception
+    {
+        log.trace("coordinator: html list");
+        TransactionList listing = getTransactions(null);
+
+        return Response.ok(TxUtil.stringFormat(listing)).build();
+    }
+
+    /**
+     * Perform a GET on /transaction-coordinator/recovery
+     * @return a list of transactions that are in recovery.
+     */
+    @GET
+    @Path("transaction-coordinator/recovery")
+    @Produces("application/json")
+    public TransactionList getRecoveringTransactions()
+    {
+        log.trace("coordinator: transaction-coordinator/recovery");
+        return getTransactions(recoveringFilter);
+    }
+
+    /**
+     * Perform a GET on /transaction-coordinator/active
+     * @return a list of inflight transaction ids
+     */
+    @GET
+    @Path("transaction-coordinator/active")
+    @Produces("application/json")
+    public TransactionList getActiveTransactions()
+    {
+        log.trace("coordinator: transaction-coordinator/active");
+        return getTransactions(activeTxFilter);
+    }
+    /**
+     * Performing a DELETE on any of the transaction-coordinator URLs will return a 401.
+     * @return 401
+     */
+    @DELETE
+    @Path("transaction-coordinator/{id}")
+//    @RolesAllowed(value = "NONE")
+    public Response deleteTransaction(@PathParam("id") String id)
+    {
+        log.trace("coordinator: delete: transaction-coordinator/" + id);
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED);
+    }
+
+    /**
+     * Start a new transaction (which will be deleted when the tx timeout value is reached).
+     * Calls to a timed out tx will return 404 (in which case the caller may assume rollback)
+     * @param clientId the unique identity of the client (can be a URL too)
+     * @param timeout period in milliseconds
+     * @return a <URL> of the form /transaction-coordinator/<TxId>
+     */
+    @POST
+    @Path("transaction-coordinator/begin/")
+    public Response beginTransaction(@QueryParam("clientId")String clientId, @QueryParam("timeout") @DefaultValue("-1")int timeout)
+//    @Path("transaction-coordinator/begin/{clientId}")
+//    public Response beginTransaction(@PathParam("clientId")String clientId, @QueryParam("timeout") @DefaultValue("0")int timeout)
+    {
+        log.trace("coordinator: begin: transaction-coordinator/begin/" + clientId + "?timeout=" + timeout);
+        Transaction tx = new Transaction(clientId);
+        String uid = tx.get_uid().fileStringForm();
+
+        transactions.put(uid, tx);
+        int status = tx.begin(timeout);
+
+        try
+        {
+            if (status == ActionStatus.RUNNING)
+                return TxUtil.postResponse(TxUtil.txURI + '/' + uid);
+
+            throw new TransactionStatusException("Transaction failed to start: " + status);
+        }
+        finally
+        {
+            AtomicAction.suspend();
+        }
+    }
+
+    /**
+     * trigger a commit of the transaction. Upon termination, the URL is implicitly
+     * deleted. If it no longer exists, then 404 will be returned. The invoker
+     * cannot know for sure whether the transaction committed or rolled back.
+     * This is the same problem with JTS: to be sure you should register a 2PC participant.
+     * @param txId transaction id
+     * @return http response code
+     */
+    @PUT
+    @Path("transaction-coordinator/{TxId}/commit")
+    public Response commitTransaction(@PathParam("TxId")String txId, @QueryParam("fault") @DefaultValue("")String fault)
+    {
+        log.debug("coordinator: commit: transaction-coordinator/" + txId + "/commit");
+        Transaction tx = getTransaction(txId);
+
+        tx.setFault(fault);
+        AtomicAction.resume(tx);
+        int res = tx.commit(true);
+        log.trace("commit result: " + res);
+
+        if (tx.isTransactionInMidFlight())
+        {
+            AtomicAction.suspend();
+            throw new TransactionStatusException("Transaction failed to commit: ");
+        }
+
+        if (!tx.hasHeuristic())
+            transactions.remove(txId);
+
+        return TxUtil.response(HttpResponseCodes.SC_OK);
+    }
+
+    @PUT
+    @Path("transaction-coordinator/{TxId}/rollback")
+    public Response rollbackTransaction(@PathParam("TxId")String txId, @QueryParam("fault") @DefaultValue("")String fault)
+    {
+        log.debug("coordinator: rollback: transaction-coordinator/" + txId + "/rollback");
+        Transaction tx = getTransaction(txId);
+
+        tx.setFault(fault);
+        AtomicAction.resume(tx);
+        int res = tx.abort();
+        log.trace("rollback result: " + res);
+
+        if (tx.isTransactionInMidFlight())
+        {
+            AtomicAction.suspend();
+            throw new TransactionStatusException("Transaction failed to rollback: ");
+        }
+
+        if (!tx.hasHeuristic())
+            transactions.remove(txId);
+
+        return TxUtil.response(HttpResponseCodes.SC_OK);
+    }
+
+    /**
+     * Register a participant in a tx
+     * @param txId id of transaction
+     * @param url participant id (unique within the scope of txId)
+     * @return unique resource ref for the participant
+     */
+    @PUT
+    @Path("transaction-coordinator/{TxId}")
+    @Consumes("text/html")
+    public Response enlistParticipant(@PathParam("TxId")String txId, @QueryParam("URL")String url, String content)
+    {
+        Transaction tx = getTransaction(txId);
+
+        if (url == null)
+		url = content.trim();
+
+        String coordinatorId = tx.enlistParticipant(url);
+
+        if (coordinatorId == null)
+            return TxUtil.response(HttpResponseCodes.SC_NOT_ACCEPTABLE);
+
+        log.debug("enlisting participant: content=" + content +
+		" URL=" + url + " in tx " + txId + " Coordinator url: " + TxUtil.rcURI + '/' + coordinatorId);
+        // TODO would be nice if there was something in the spec for telling the participant it
+        // has been enlisted
+        participants.put(coordinatorId, url);
+
+        return Response.ok(TxUtil.rcURI + '/' + coordinatorId).build();
+    }
+         
+    /**
+     * Get the participant url (registered during enlistParticipant) corresponding to a resource reference
+     * if the coordinator crashes - the participant list will be empty but this is ok if commit hasn't been
+     * called since the TM uses presumed abort sematics.
+     * @param enlistmentId the resource reference
+     * @return the participant url
+     */
+    @GET
+    @Path("recovery-coordinator/{RecCoordId}")
+    public Response lookupParticipant(@PathParam("RecCoordId")String enlistmentId)
+    {
+        log.trace("coordinator: lookup: transaction-coordinator/" + enlistmentId);
+
+        String p = participants.get(enlistmentId);
+
+        if (p == null)
+            return TxUtil.response(HttpResponseCodes.SC_NOT_FOUND);
+
+        return Response.ok(p).build();
+    }
+
+    /**
+     * PUT /recovery-coordinator/<RecCoordId>/<new participant URL> -
+     *   overwrite the old <participant URL> with <new participant URL>
+     *   (as with JTS, this will also trigger off a recovery attempt on the associated transaction)
+     * A participant may use this url to notifiy the coordinator that he has moved to a new location.
+     * @param url
+     */
+    @PUT
+    @Path("recovery-coordinator/{RecCoordId}")
+    public Response replaceParticipant(@PathParam("RecCoordId")String enlistmentId, @QueryParam("URL")String url)
+    {
+        log.trace("coordinator: replace: recovery-coordinator/" + enlistmentId + "?URL=" + url);
+        participants.put(enlistmentId, url);
+
+        return TxUtil.response(HttpResponseCodes.SC_OK);
+    }
+
+    @POST
+    @Path("recovery-coordinator/{RecCoordId}")
+    public Response postParticipant(@PathParam("RecCoordId")String enlistmentId)
+    {
+        log.trace("coordinator: replace via Post: recovery-coordinator/" + enlistmentId);
+        return Response.status(HttpResponseCodes.SC_UNAUTHORIZED).build();
+    }
+
+    @DELETE
+    @Path("recovery-coordinator/{RecCoordId}")
+    public Response deleteParticipant(@PathParam("RecCoordId")String enlistmentId)
+    {
+        log.trace("coordinator: replace vi Delete: recovery-coordinator/" + enlistmentId);
+        return TxUtil.response(HttpResponseCodes.SC_UNAUTHORIZED);
+    }
+
+    private Transaction getTransaction(String txId)
+    {
+        Transaction tx = transactions.get(txId);
+
+        if (tx == null)
+            throw new ResourceNotFoundException("Transaction id not found");
+
+        return tx;
+    }
+
+    private TransactionList getTransactions(TransactionFilter filter)
+    {
+        List<Transaction> list = new ArrayList<Transaction>();
+
+        if (filter == null)
+        {
+            list.addAll(transactions.values());
+        }
+        else
+        {
+            for (Transaction t : transactions.values())
+                if (filter.accept(t))
+                    list.add(t);
+        }
+
+        return new TransactionList(list);
+    }
+
+    TransactionFilter activeTxFilter = new TransactionFilter() {
+        public boolean accept(Transaction t)
+        {
+            return t.isTransactionInMidFlight();
+        }
+    };
+
+    TransactionFilter recoveringFilter = new TransactionFilter() {
+        public boolean accept(Transaction t)
+        {
+            return !t.isTransactionInMidFlight();
+        }
+    };
+
+    interface TransactionFilter
+    {
+        boolean accept(Transaction t);
+    }
+}
+

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TMApplication.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,75 @@
+package org.jboss.jbossts.rts.service;
+
+import com.arjuna.ats.arjuna.recovery.RecoveryManager;
+
+import javax.ws.rs.core.Application;
+import javax.ws.rs.ext.ExceptionMapper;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Arrays;
+
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+import org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer;
+import org.jboss.jbossts.rts.provider.NotFoundMapper;
+import org.jboss.jbossts.rts.provider.TMUnavailableMapper;
+import org.jboss.jbossts.rts.provider.TransactionStatusMapper;
+import org.jboss.jbossts.rts.provider.HttpResponseMapper;
+
+public class TMApplication extends Application
+{
+    HashSet<Object> singletons = new HashSet<Object>();
+
+    public TMApplication()
+    {
+        try
+        {
+            // TODO move com/arjuna/ats/jbossatx/jt[as]/TransactionManagerService.isRecoveryManagerRunning
+            // to RecoveryManager and change logging
+            if ("true".equals(System.getProperty("recovery", "true")))
+                RecoveryManager.manager();
+        }
+        catch (Throwable e)
+        {
+            // did it really fail or was it already running?
+            System.err.println("INFO: " + e.getMessage());
+        }
+    }
+
+    @Override
+    public Set<Class<?>> getClasses()
+    {
+        return new HashSet<Class<?>>();
+    }
+
+    @Override
+    public Set<Object> getSingletons()
+    {
+        if (singletons.isEmpty())
+            singletons.addAll(Arrays.asList(resources));
+
+        return singletons;
+    }
+
+    public static void initApplication(EmbeddedJaxrsServer server)
+    {
+        ResteasyProviderFactory pf = server.getFactory();
+
+        for (Class<?> m : mappers)
+            pf.addExceptionMapper((Class<? extends ExceptionMapper>) m);
+
+        for (Object obj : resources)
+            server.getRegistry().addSingletonResource(obj);
+    }
+
+    private static Class<?>[] mappers = {
+        NotFoundMapper.class,
+        TMUnavailableMapper.class,
+        TransactionStatusMapper.class,
+        HttpResponseMapper.class
+    };
+    
+    private static Object[] resources = {
+            new Coordinator(),
+            new org.jboss.jbossts.rts.example.Participant()
+    };  
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TransactionalParticipant.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TransactionalParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/service/TransactionalParticipant.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,53 @@
+package org.jboss.jbossts.rts.service;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+
+/**
+ * Not used. This interface shows the methods that a participant must implement.
+ * However the methods constrain the form that a participant url must take and
+ * is therefore inappropriate (since they ought to be unconstrained).
+ */
+public interface TransactionalParticipant
+{
+    @GET
+    @Path("{pId}/tx/{tid}")
+    Response getStatus(@PathParam("pId")String pid, @QueryParam("context") String ctx, @PathParam("status") String status);
+
+    @POST
+    @Path("{pId}/tx/{tid}/prepare/")
+    Response prepare(@PathParam("pId")String pid, @PathParam("tid")String tid);
+
+    @POST
+    @Path("{pId}/tx/{tid}/commit/")
+    Response commit(@PathParam("pId")String pid, @PathParam("tid")String tid);
+
+    @POST
+    @Path("{pId}/tx/{tid}/rollback/")
+    Response rollback(@PathParam("pId")String pid, @PathParam("tid")String tid);
+
+    @POST
+    @Path("{pId}/tx/{tid}/forget/")
+    Response forget(@PathParam("pId")String pid, @PathParam("tid")String tid);    
+
+// don't forget about one phase commit
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/java/org/jboss/jbossts/rts/util/TxUtil.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,270 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2008
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.rts.util;
+
+import org.apache.commons.httpclient.methods.*;
+import org.apache.commons.httpclient.*;
+import org.apache.log4j.Logger;
+import org.jboss.jbossts.rts.provider.HttpResponseException;
+import org.jboss.resteasy.plugins.providers.jaxb.json.JettisonMappedContext;
+import org.jboss.resteasy.util.HttpResponseCodes;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.JAXBException;
+import javax.ws.rs.core.Response;
+
+/**
+ * Various utilites for sending HTTP messages
+ */
+public class TxUtil
+{
+    protected static final Logger log = Logger.getLogger(TxUtil.class);
+    
+    public static final String TX_URI_PREFIX = "transaction-coordinator";
+    public static final String RC_URI_PREFIX = "recovery-coordinator";
+    
+    private static HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
+
+    private static int serverPort = getIntProperty("PORT", "9096");
+    private static String serverHost = "localhost";
+    private static String serverContext = "tx/";
+    private static String baseURI = "http://" + serverHost + ":" + serverPort + "/" + serverContext;
+
+    public static String txURI = TxUtil.getBaseURI() + TX_URI_PREFIX;
+    public static String rcURI = TxUtil.getBaseURI() + RC_URI_PREFIX;
+
+    public static int getIntProperty(String name, String def)
+    {
+        String port = System.getProperty(name, def);
+
+        try {
+            return Integer.valueOf(port);
+        } catch (NumberFormatException e) {
+            try {
+                return Integer.valueOf(def);
+            } catch (NumberFormatException e2) {
+                throw new IllegalArgumentException("invalid default value for server port: " + def, e2);
+            }
+        }
+    }
+
+    private static void updateEndpoint()
+    {
+        baseURI = "http://" + serverHost + ":" + serverPort + "/" + serverContext;
+        txURI = baseURI + TX_URI_PREFIX;
+        rcURI = baseURI + RC_URI_PREFIX;
+        log.info("base URI: " + baseURI);
+    }
+
+    public static void setPort(int port)
+    {
+        serverPort = port;
+        updateEndpoint();
+    }
+
+    public static void setHost(String host)
+    {
+        serverHost = host;
+        updateEndpoint();
+    }
+
+    public static void setContext(String context)
+    {
+        serverContext = context;
+        updateEndpoint();
+    }
+
+    public static void setEndpoint(String host, int port, String prefix)
+    {
+        serverPort = port;
+        serverHost = host;
+        serverContext = prefix;
+        updateEndpoint();
+    }
+
+    public static String getBaseURI()
+    {
+        return baseURI;
+    }
+
+    public static String doMethod(int[] expect, HttpMethod method, String ... nvParams) throws HttpResponseException
+    {
+//        log.trace("Method: " + method.getName() + " " + method.getURI().toString() + " expect response: " + expect);
+        int status = -1;
+        int ex = expect.length == 0 ? -1 : expect[0];
+
+        if (nvParams.length != 0)
+        {
+            NameValuePair[] params = new NameValuePair[nvParams.length];
+
+            for (int i = 0; i < nvParams.length; i++)
+            {
+                String[] pair = nvParams[i].split("=");
+                if (expect.length == 0)
+                    assert pair.length == 2;
+                params[i] = new NameValuePair(pair[0], pair[1]);
+            }
+
+            method.setQueryString(params);
+        }
+
+        try
+        {
+            log.trace(method.getName() + ": " + method.getURI());
+            status = client.executeMethod(method);
+
+            for (int i : expect)
+                if (i == status) {
+                    return getResponseBodyFromSteam(method);
+                }
+
+            throw new HttpResponseException(null, getResponseBodyFromSteam(method), ex, status);
+
+        }
+        catch (IOException e)
+        {
+            throw new HttpResponseException(e, "", ex, status);
+        }
+        finally
+        {
+            method.releaseConnection();
+        }
+    }
+
+    private static String getResponseBody(HttpMethod method)
+    {
+        try
+        {
+            if (method.getResponseBody() == null)
+                return method.getStatusLine().toString();
+
+            return new String(method.getResponseBody(), "US-ASCII");
+        }
+        catch (IOException e)
+        {
+            return e.getMessage();
+        }
+    }
+
+    private static String getResponseBodyFromSteam(HttpMethod method)
+    {
+        try
+        {
+            InputStream is = method.getResponseBodyAsStream();
+            StringBuilder sb = new StringBuilder();
+            byte[] buf = new byte[1024];
+            int len;
+
+            while ((len = is.read(buf)) != -1)
+                sb.append(new String(buf, 0, len)); //, "US-ASCII");
+
+            is.close();
+
+            return sb.toString();
+        }
+        catch (IOException e)
+        {
+            return e.getMessage();
+        }
+    }
+
+    public static String doGet(int[] expect, String url, String... nvParams) throws HttpResponseException
+    {
+        return doMethod(expect, new GetMethod(url), nvParams);
+    }
+
+    public static String doPost(int[] expect, String url, String... nvParams) throws HttpResponseException
+    {
+        HttpMethod method = new PostMethod(url);
+        String res = doMethod(expect, method, nvParams);
+        Header header = method.getResponseHeader("location");
+        log.debug("post response location header: " + (header != null ? header.getValue() : "null"));
+        return header != null ? header.getValue() : res;
+    }
+
+    public static String doPut(int[] expect, String url, String request, String... nvParams) throws HttpResponseException
+    {
+        PutMethod pm = new PutMethod(url);
+
+        if (request != null) {
+            try
+            {
+                pm.setRequestEntity(new StringRequestEntity(request, "text/html", null));
+            }
+            catch (UnsupportedEncodingException e)
+            {
+                log.debug("put request entity create error");
+                e.printStackTrace();
+            }
+        }
+
+        return doMethod(expect, pm, nvParams);
+    }
+
+    public static String doDelete(int[] expect, String url, String... nvParams) throws HttpResponseException
+    {
+        return doMethod(expect, new DeleteMethod(url), nvParams);
+    }
+
+    public static String stringFormat(Object obj) throws JAXBException
+    {
+        JettisonMappedContext context = new JettisonMappedContext(obj.getClass());
+        StringWriter writer = new StringWriter();
+        Marshaller marshaller = context.createMarshaller();
+        marshaller.marshal(obj, writer);
+        
+        return writer.toString();
+    }
+
+    public static Response postResponse(String uri)
+    {
+        try
+        {
+            return Response.status(HttpResponseCodes.SC_CREATED).location(new URI(uri)).build();
+        }
+        catch (URISyntaxException e)
+        {
+            return Response.status(HttpResponseCodes.SC_INTERNAL_SERVER_ERROR).build();
+        }
+    }
+
+    public static Response response(int code)
+    {
+        return Response.status(code).build();
+    }
+
+    public static Response response(String body)
+    {
+        if (body == null || body.length() == 0)
+            return TxUtil.response(HttpResponseCodes.SC_NO_CONTENT);
+
+        Response.ResponseBuilder builder = Response.ok(body);
+
+        return builder.build();
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/main/webapp/WEB-INF/web.xml
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/main/webapp/WEB-INF/web.xml	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!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>Archetype Created Web Application</display-name>
+
+   <context-param>
+      <param-name>javax.ws.rs.core.Application</param-name>
+      <param-value>org.jboss.jbossts.rts.service.TMApplication</param-value>
+   </context-param>
+
+   <context-param>
+      <param-name>resteasy.servlet.mapping.prefix</param-name>
+      <param-value>/tx</param-value>
+   </context-param>
+
+   <listener>
+      <listener-class>
+         org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
+      </listener-class>
+   </listener>
+
+   <servlet>
+      <servlet-name>Tx</servlet-name>
+      <servlet-class>
+         org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
+      </servlet-class>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Tx</servlet-name>
+      <url-pattern>/tx/*</url-pattern>
+   </servlet-mapping>
+
+</web-app>
\ No newline at end of file

Added: labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/test/AppTest.java
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/test/AppTest.java	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/test/java/org/jboss/jbossts/rts/test/AppTest.java	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,236 @@
+package org.jboss.jbossts.rts.test;
+
+import junit.framework.TestCase;
+
+import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer;
+import org.jboss.resteasy.util.HttpResponseCodes;
+import org.jboss.jbossts.rts.util.TxUtil;
+import org.jboss.jbossts.rts.service.TMApplication;
+import org.jboss.jbossts.rts.provider.HttpResponseException;
+import org.apache.log4j.Logger;
+
+import java.io.IOException;
+
+/**
+ * Run through some basic tests to validate that the protocol matches the specification
+ */
+public class AppTest extends TestCase
+{
+    protected final static Logger log = Logger.getLogger(AppTest.class);
+    private static int PORT = TxUtil.getIntProperty("PORT", "9096");
+    private static TJWSEmbeddedJaxrsServer tjws;
+
+    private String[] URLS;
+
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public AppTest( String testName )
+    {
+        super( testName );
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+
+        TxUtil.setEndpoint("localhost", PORT, "");
+
+        log.trace("setUp: " + TxUtil.getBaseURI());
+        URLS = new String[] {
+                TxUtil.txURI + ".html", // list txns
+                TxUtil.txURI + "/begin?clientId=12345",   // start a tx on behalf of client id 12345
+                TxUtil.txURI + "/tx/commit",   // commit tx 123
+                TxUtil.txURI + "/0/commit", // commit a non existant tx
+                TxUtil.txURI + "/commit", // commit a non existant tx
+                TxUtil.txURI + "/tx",   // enlist a participant in tx 123
+        };
+
+        tjws = new TJWSEmbeddedJaxrsServer();
+        tjws.setPort(PORT);
+        tjws.setBindAddress("127.0.0.1");
+        TMApplication.initApplication(tjws);
+        tjws.start();
+        System.out.println("web server is running on port " + PORT);
+    }
+
+    protected void tearDown() throws Exception
+    {
+        log.trace("stoppig server");
+        super.tearDown();
+
+        tjws.stop();
+    }
+
+    private String startTx(long timeout, boolean fail) throws IOException
+    {
+        String tx = null;
+
+        try {
+            String query = "clientId=12345" + (timeout == 0 ? "" : "&timeout=" + timeout);
+
+            tx = TxUtil.doPost(new int[] {HttpResponseCodes.SC_CREATED}, TxUtil.txURI + "/begin?" + query);
+            log.trace("Started tx: " + tx);
+            if (fail)
+                assertTrue("start tx should have failed", false);
+        } catch (HttpResponseException e) {
+            if (!fail)
+                assertTrue(e.getMessage(), false);
+        }
+
+        return tx;
+    }
+
+    private String modifyResource(String tx, String pid, String name, String value)
+    {
+        try {
+            return TxUtil.doPost(new int[] {HttpResponseCodes.SC_OK}, TxUtil.getBaseURI() + "participant/work/" + pid,
+                    "name=" + name, "value=" + value, "context=" + tx);
+        } catch (HttpResponseException e) {
+            assertTrue(e.getMessage(), false);
+            return null;
+        }
+    }
+
+    private String getResource(String tx, String pid, String name)
+    {
+        try {
+            return TxUtil.doGet(new int[] {HttpResponseCodes.SC_OK}, TxUtil.getBaseURI() + "participant/work/" + pid,
+                    "name=" + name, "context=" + tx);
+        } catch (HttpResponseException e) {
+            assertTrue(e.getMessage(), false);
+            return null;
+        }
+    }
+
+    private void terminateTx(String tx, String how, boolean fail, String ... args)
+    {
+        try {
+            TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, tx + "/" + how, "", args);
+            if (fail)
+                assertTrue("commit should not have succeeded", false);
+        } catch (HttpResponseException e) {
+            if (!fail)
+                assertTrue(e.getMessage(), false);
+	}
+    }
+
+    private void commitTx(String tx, boolean fail, String ... args)
+    {
+        terminateTx(tx, "commit", fail, args);
+    }
+
+    private void rollbackTx(String tx, boolean fail, String ... args)
+    {
+        terminateTx(tx, "rollback", fail, args);
+    }
+
+    // 1PC commit
+    public void test1() throws IOException
+    {
+        String tx = startTx(0L, false);
+        modifyResource(tx, "pid1", "p1", "v1");
+        commitTx(tx, false);
+    }
+    // 2PC commit
+    public void test2() throws IOException
+    {
+        String tx = startTx(0L, false);
+        modifyResource(tx, "pid1", "p1", "v1");
+        modifyResource(tx, "pid2", "p2", "v2");
+        commitTx(tx, false);
+        commitTx(tx, true);	// should not be able to commit a completed transaction
+    }
+    // commit an invalid transaction
+    public void test3() throws IOException
+    {
+        String tx = "http://localhost:9096/transaction-coordinator/dead_7f000001_b9cc_4981ded5_5";
+        commitTx(tx, true);
+    }
+
+    /**
+     * Modify a resource within a transaction and rollback.
+     * Ensure that the resource has not changed.
+     */
+    public void test4() throws IOException
+    {
+        String v1 = modifyResource(null, "pid1", "p1", "v1");
+        String v2 = modifyResource(null, "pid2", "p1", "v1");
+
+        String tx = startTx(0L, false);
+
+        String v3 = modifyResource(tx, "pid1", "p1", "txv1");
+        String v4 = modifyResource(tx, "pid2", "p1", "txv1");
+
+        rollbackTx(tx, false);
+        rollbackTx(tx, true);	// should not be able to rollback a completed transaction
+
+        // make sure the changes were rolled back
+        String v5 = getResource(null, "pid1", "p1");
+        String v6 = getResource(null, "pid2", "p1");
+
+        assertTrue("participant 1's work wasn't rolled back correctly", v1.equals(v5));
+        assertTrue("participant 2's work wasn't rolled back correctly", v2.equals(v6));
+    }
+
+    /**
+     * Test the Recovery URL
+     */
+    public void test5() throws IOException
+    {
+        String tx = startTx(0L, false);	// start a transaction
+
+        String pUrl = TxUtil.getBaseURI() + "particpant/123";	// participant url
+	// Registering a participant with the transaction returns a recovery url
+        String recCoordId = TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, tx, pUrl, "URL=" + pUrl);
+
+	// doing a GET on recCoordId should return the original url
+        String origUrl = TxUtil.doGet(new int[] {HttpResponseCodes.SC_OK}, recCoordId);
+	assertEquals("GET on recovery url does not return orignal participant url", pUrl, origUrl);
+
+	// doing a PUT on recCoordId should replace the participant URL (used by
+	// participants to tell the recovery coordinator that they have moved
+	pUrl = TxUtil.getBaseURI() + "particpant/123"; // the new participant URL
+        // replace the url with a new one
+        TxUtil.doPut(new int[] {HttpResponseCodes.SC_OK}, recCoordId, pUrl, "URL=" + pUrl);
+
+        // check that the url was replaced by doing another GET on the recovery URL
+        origUrl = TxUtil.doGet(new int[] {HttpResponseCodes.SC_OK}, recCoordId);
+        assertEquals("GET on recovery url does not return the replaced participant url", pUrl, origUrl);
+
+        // and finally check that POST and DELETE on the recovery URL fail
+        TxUtil.doPost(new int[] {HttpResponseCodes.SC_UNAUTHORIZED}, recCoordId);
+        TxUtil.doDelete(new int[] {HttpResponseCodes.SC_UNAUTHORIZED}, recCoordId);
+
+        rollbackTx(tx, false);
+    }
+
+    /*
+     * Test recovery
+     */
+    public void test6() throws IOException
+    {
+        boolean crashVM = false;
+        String[] txns = {startTx(0L, false), startTx(0L, false)};
+
+        for (int i = 0; i < txns.length; i++) {
+            modifyResource(txns[i], "pid1", "p1", "v1" + i);
+            modifyResource(txns[i], "pid2", "p2", "v2" + i);
+        }
+
+        // list transactions
+        String txlist = TxUtil.doGet(new int[] {HttpResponseCodes.SC_OK}, TxUtil.txURI);
+        // there should be 2
+        assertEquals("List transactions does not match the number of running transactions",
+            txlist.split("ActionStatus").length - 1, 2);
+
+        for (int i = 0; i < txns.length; i++) {
+            if (i == txns.length - 1 && crashVM)
+            	commitTx(txns[i], false, "fault=commit_halt");
+            else
+            	commitTx(txns[i], false);
+        }
+    }
+}

Added: labs/jbosstm/workspace/resttx/tx/src/test/resources/jbossjta-properties.xml
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/test/resources/jbossjta-properties.xml	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/test/resources/jbossjta-properties.xml	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<transaction-service>
+    <properties depends="common" name="arjuna">
+        <property
+            name="com.arjuna.ats.internal.arjuna.inventory.staticInventoryImple.RESTRecord" value="org.jboss.jbossts.rts.resource.RESTRecordSetup" />
+        <!--
+        Transaction Reaper Timeout (default is 120000 ms).
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.txReaperTimeout" value="120000"/>
+        <!--
+        Transaction Reaper Mode, can be: PERIODIC or DYNAMIC. Default is DYNAMIC.
+      -->
+        <property name="com.arjuna.ats.arjuna.coordinator.txReaperMode" value="DYNAMIC"/>
+        <!--
+        Transaction Reaper Cancel Wait Period (default is 500 ms, min is 10 msecs).
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.txReaperCancelWaitPeriod" value="500"/>
+        <!--
+        Transaction Reaper Cancel Fail Wait Period (default is 500 ms, min is 10 msecs).
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.txReaperCancelFailWaitPeriod" value="500"/>
+        <!--
+        Transaction Reaper Zombie Max (default is 8).
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.txReaperZombieMax" value="8"/>
+        <!--
+        (default is NO)
+      -->
+        <property name="com.arjuna.ats.arjuna.coordinator.asyncCommit" value="NO"/>
+        <!--
+        (default is NO)
+      -->
+        <property name="com.arjuna.ats.arjuna.coordinator.asyncPrepare" value="NO"/>
+        <!--
+        (default is YES)
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.commitOnePhase" value="YES"/>
+        <!--
+        (default is defaultStore)
+      -->
+        <property name="com.arjuna.ats.arjuna.objectstore.localOSRoot" value="defaultStore"/>
+        <!--
+        default is under user.home - must be writeable!)
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.objectstore.objectStoreDir" value="ObjectStore" />
+        <property name="com.arjuna.ats.arjuna.coordinator.transactionLog" value="OFF"/>
+        <!--
+        (default is ON)
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.objectstore.objectStoreSync" value="ON"/>
+        <!--
+        (default is ShadowNoFileLockStore)
+      -->
+        <property name="com.arjuna.ats.arjuna.objectstore.objectStoreType" value="ShadowNoFileLockStore"/>
+        <!--
+        (default is 255)
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.objectstore.hashedDirectories" value="255"/>
+        <!--
+        (default is ON)
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.objectstore.transactionSync" value="ON"/>
+        <!--
+        (Must be unique across all Arjuna instances.)
+      -->
+        <property name="com.arjuna.ats.arjuna.xa.nodeIdentifier" value="1"/>
+        <!--
+        Base port number for determining a unique number to associate with an instance of the transaction service
+        (which is needed in order to support multiple instances on the same machine).
+        Use the value 0 to allow the system to select the first available port number.
+        If the port number is non-zero and the port is in use then the value will be incremented until either a successful binding
+        to the loopback address is created or until the the maximum number of ports (specified by the
+        com.arjuna.ats.internal.arjuna.utils.SocketProcessIdMaxPorts property) have been tried or until the port number
+        reaches the maximum possible port number.
+      -->
+        <property
+            name="com.arjuna.ats.internal.arjuna.utils.SocketProcessIdPort" value="0"/>
+        <!--
+        The maximum number of ports to try starting from the value specified by the property
+        com.arjuna.ats.internal.arjuna.utils.SocketProcessIdPort. Any non-numeric or value less than 1 will
+        defautl to 1.
+      -->
+        <property
+            name="com.arjuna.ats.internal.arjuna.utils.SocketProcessIdMaxPorts" value="1"/>
+        <!--
+        Run the TransactionStatusManager to allow out-of-process recovery managers to query
+        the status of transactions owned by this coordinator.  Default is YES.
+        This can be set to NO in cases where an ObjectStore is used only by one transaction manager
+        and the recovery manager for that store is in the same JVM. In any other cases disabling the
+        TransactionStatusManager may cause crash recovery to misbehave.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.coordinator.transactionStatusManagerEnable" value="NO"/>
+        <!-- property
+        name="com.arjuna.ats.arjuna.coordinator.actionStore"
+		value="HashedActionStore"
+		value="JDBCActionStore"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.jdbcTxDbAccess"
+		value="JDBCAccess"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.objectStoreType"
+		value="ShadowNoFileLockStore"
+		value="JDBCStore"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.jdbcUserDbAccess"
+		value="JDBCAccess"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeInitial"
+		value="1"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeMaximum"
+		value="1"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.objectstore.jdbcPoolPutConnections"
+		value="false"
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.internal.arjuna.objectstore.cacheStore.size"
+		value=""
+      -->
+        <!-- property
+        name="com.arjuna.ats.arjuna.internal.arjuna.objectstore.cacheStore.period"
+		value=""
+      -->
+        <!--
+        The location for creating temporary files, e.g., Uids.
+        Default is under user.home.
+        IMPORTANT: make sure the directory is lockable, e.g., /tmp on Unix
+        may not be!
+      -->
+        <!--
+        <property
+          name="com.arjuna.ats.arjuna.common.varDir"
+          value="var"/>
+      -->
+    </properties>
+    <properties name="common">
+        <!-- CLF 2.0 properties -->
+        <property name="com.arjuna.common.util.logging.DebugLevel"
+            type="System" value="0x00000000"/>
+        <property name="com.arjuna.common.util.logging.FacilityLevel"
+            type="System" value="0xffffffff"/>
+        <property name="com.arjuna.common.util.logging.VisibilityLevel"
+            type="System" value="0xffffffff"/>
+        <property name="com.arjuna.common.util.logger" type="System" value="log4j"/>
+    </properties>
+    <properties depends="arjuna" name="txoj">
+        <!--
+        (default is LockStore of installation - must be writeable!)
+      -->
+        <!--
+        <property
+          name="com.arjuna.ats.txoj.lockstore.lockStoreDir"
+          value="LockStore"/>
+      -->
+        <!--
+        (default is BasicLockStore)
+      -->
+        <property name="com.arjuna.ats.txoj.lockstore.lockStoreType" value="BasicLockStore"/>
+        <!--
+        (default is NO)
+      -->
+        <property name="com.arjuna.ats.txoj.lockstore.multipleLockStore" value="NO"/>
+        <!--
+        (default is YES)
+      -->
+        <property name="com.arjuna.ats.txoj.lockstore.singleLockStore" value="YES"/>
+        <!--
+        (default is YES)
+      -->
+        <property
+            name="com.arjuna.ats.txoj.lockstore.allowNestedLocking" value="YES"/>
+    </properties>
+    <properties depends="arjuna" name="jta">
+        <!--
+        Support subtransactions in the JTA layer?
+        Default is NO.
+      -->
+        <property name="com.arjuna.ats.jta.supportSubtransactions" value="NO"/>
+        <property name="com.arjuna.ats.jta.jtaTMImplementation" value="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
+        <!--
+			com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple
+			-->
+        <property name="com.arjuna.ats.jta.jtaUTImplementation" value="com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"/>
+        <!--
+			com.arjuna.ats.internal.jta.transaction.jts.UserTransactionImple
+			-->
+    </properties>
+    <properties depends="arjuna,txoj,jta" name="recoverymanager">
+        <!--
+        Properties used only by the RecoveryManager.
+      -->
+        <!--
+        Periodic recovery settings.
+        Time values in this section are in seconds.
+      -->
+        <!--
+        Interval in seconds between initiating the periodic recovery modules.
+        Default is 120 seconds.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod" value="120"/>
+        <!--
+        Interval in seconds between first and second pass of periodic recovery.
+        Default is 10 seconds.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod" value="10"/>
+        <!--
+        The port number on which the recovery manager listens.
+      -->
+        <property name="com.arjuna.ats.arjuna.recovery.recoveryPort" value="4712"/>
+        <!--
+        The address on which the recovery manager listens.
+        If running within an AS then the address the AS is bound to (jboss.bind.address) takes precedence
+      -->
+        <property name="com.arjuna.ats.arjuna.recovery.recoveryAddress" value=""/>
+        <!--
+        Periodic recovery modules to use.  Invoked in sort-order of names.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
+        <property
+            name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"/>
+        <property
+            name="com.arjuna.ats.arjuna.recovery.recoveryExtension3" value="com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"/>
+        <!--
+        Expired entry removal
+      -->
+        <!--
+        Expiry scanners to use (order of invocation is random).
+        Names must begin with "com.arjuna.ats.arjuna.recovery.expiryScanner"
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.expiryScannerTransactionStatusManager" value="com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner"/>
+        <!--
+        Interval, in hours, between running the expiry scanners.
+        This can be quite long. The absolute value determines the interval -
+        if the value is negative, the scan will NOT be run until after one
+        interval has elapsed. If positive the first scan will be immediately
+        after startup. Zero will prevent any scanning.
+        Default  = 12 = run immediately, then every 12 hours.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.expiryScanInterval" value="12"/>
+        <!--
+        This is the interval, in hours, after which a process that cannot be contacted will be considered dead.
+        It should be long enough to avoid accidentally removing valid entries due to short lived
+        transient errors such as network downtime. Zero = Never removed.  Default is 12.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerExpiryTime" value="12"/>
+        <!--
+        Use this to fix the port on which the TransactionStatusManager listens,
+        The default behaviour is to use any free port.
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort" value="0"/>
+        <!--
+        Use this to fix the address on which the TransactionStatusManager binds,
+        The default behaviour is to use the loopback address (ie localhost).
+        If running within an AS then the address the AS is bound to (jboss.bind.address) takes precedence
+      -->
+        <property
+            name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerAddress" value=""/>
+        <!--
+          For cases where the recovery manager is in process with the transaction manager and nothing else uses
+          the ObjectStore, it is possible to disable the socket based recovery listener by setting this to NO.
+          Caution: use of this property can allow multiple recovery processes to run on the same ObjectStore
+          if you are not careful. That in turn can lead to incorrect transaction processing. Use with care.
+        -->
+        <property name="com.arjuna.ats.arjuna.recovery.recoveryListener" value="NO"/>
+    </properties>
+    <properties depends="jta" name="jdbc">
+        <!--
+           property name="com.arjuna.ats.jdbc.isolationLevel" value="TRANSACTION_SERIALIZABLE"/>
+        -->
+    </properties>
+</transaction-service>

Added: labs/jbosstm/workspace/resttx/tx/src/test/resources/log4j.xml
===================================================================
--- labs/jbosstm/workspace/resttx/tx/src/test/resources/log4j.xml	                        (rev 0)
+++ labs/jbosstm/workspace/resttx/tx/src/test/resources/log4j.xml	2009-05-06 21:07:32 UTC (rev 26410)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+    <appender name="console" class="org.apache.log4j.ConsoleAppender">
+        <param name="Target" value="System.out"/>
+        <param name="Threshold" value="TRACE"/>
+
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d{ABSOLUTE} {%8.8t} (%x) [%-5p,%-10c{1}] %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="file" class="org.apache.log4j.FileAppender">
+        <param name="File" value="logs/test.log"/>
+        <param name="Append" value="false"/>
+        <param name="Threshold" value="TRACE"/>
+
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d [%t] %p - %m%n"/>
+        </layout>
+    </appender>
+
+    <category name="org.jboss.resteasy">
+        <level value="TRACE"/>
+        <appender-ref ref="console"/>
+        <appender-ref ref="file"/>
+    </category>
+
+    <category name="org.jboss.jbossts.rts">
+        <level value="TRACE"/>
+        <appender-ref ref="console"/>
+        <appender-ref ref="file"/>
+    </category>
+
+    <category name="com.arjuna">
+        <level value="INFO"/>
+        <appender-ref ref="console"/>
+        <appender-ref ref="file"/>
+    </category>
+
+    <category name="org.apache.commons.httpclient">
+        <level value="WARN"/>
+        <appender-ref ref="console"/>
+        <appender-ref ref="file"/>
+    </category>
+
+</log4j:configuration>




More information about the jboss-svn-commits mailing list