[jboss-svn-commits] JBL Code SVN: r37187 - in labs/jbosstm/trunk/rest-tx/quickstarts: simple and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 30 14:01:41 EDT 2011
Author: tomjenkinson
Date: 2011-06-30 14:01:41 -0400 (Thu, 30 Jun 2011)
New Revision: 37187
Added:
labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml
labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt
labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.bat
labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.sh
labs/jbosstm/trunk/rest-tx/quickstarts/simple/
labs/jbosstm/trunk/rest-tx/quickstarts/simple/pom.xml
labs/jbosstm/trunk/rest-tx/quickstarts/simple/readme.txt
labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.bat
labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.sh
labs/jbosstm/trunk/rest-tx/quickstarts/simple/src/
Removed:
labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml
labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt
labs/jbosstm/trunk/rest-tx/quickstarts/src/
Log:
JBTM-856 update to restructure the rest-tx quickstarts folder
Deleted: labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml 2011-06-30 17:46:52 UTC (rev 37186)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml 2011-06-30 18:01:41 UTC (rev 37187)
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- JBoss, Home of Professional Open Source Copyright 2010, 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.narayana.rts</groupId>
- <artifactId>quickstarts</artifactId>
- <version>5.0.0.M1-SNAPSHOT</version>
- <name>RESTful Atomic Transaction Quickstarts</name>
- <description>Provides examples of how to use transactions with web applications</description>
-
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.narayana.rts</groupId>
- <artifactId>rest-tx-api</artifactId>
- <version>5.0.0.M1-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>exec</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <executable>java</executable>
- <workingDirectory>${project.build.directory}/exec-working-directory</workingDirectory>
- <arguments>
- <argument>-classpath</argument>
- <classpath />
- <argument>RestTransactionExample</argument>
- </arguments>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Added: labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.narayana.rts.quickstarts</groupId>
+ <artifactId>quickstarts</artifactId>
+ <version>5.0.0.M1-SNAPSHOT</version>
+ <name>RESTful Atomic Transaction Quickstarts</name>
+ <description>Provides examples of how to use transactions with web applications</description>
+ <packaging>pom</packaging>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${project.build.directory}/exec-working-directory</workingDirectory>
+ <arguments>
+ <argument>-classpath</argument>
+ <classpath />
+ <argument>RestTransactionExample</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>simple</module>
+ </modules>
+</project>
Deleted: labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt 2011-06-30 17:46:52 UTC (rev 37186)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt 2011-06-30 18:01:41 UTC (rev 37187)
@@ -1,29 +0,0 @@
-OVERVIEW
---------
-An example of how to start and end a transaction using REST style semantics.
-
-
-USAGE
------
-Deploy the rest-tx war (rest-tx-web-5.0.0.M1-SNAPSHOT.war) into a running AS7 (or AS6) application server listening
-for http requests on localhost (if you use a different host/port change the url in RestTransactionExample.TXN_MGR_URK).
-
-mvn compile exec:exec
-
-
-EXPECTED OUTPUT
----------------
-transaction running: txStatus=TransactionActive
-Success
-
-
-WHAT JUST HAPPENED?
--------------------
-We deployed a JAX-RS servlet that implements a RESTful interface to the Narayana transaction manager (TM).
-The example started a transaction by POSTing to a well known url that the JAX-RS servlet was listening on.
-The servlet looked up the TM running in the container it was deployed to and started a transaction.
-The servlet returned a URL (the transaction URL) that the example can use to control the termination of the active transaction.
-The example performed an HTTP GET request on the transaction URL to check that the transaction status was active.
-The example counted the number of running transactions (in order to check that at least one was active).
-The example performed an HTTP PUT request to the transaction URL thus terminating the transaction.
-The example counted the number of running transactions in order to verify that there was one less transaction.
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt (from rev 37186, labs/jbosstm/trunk/ArjunaCore/quickstarts/readme.txt)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,22 @@
+JBoss, Home of Professional Open Source Copyright 2008, 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.
+
+
+OVERVIEW
+--------
+All the quickstarts related to rest-tx are found in this folder structure. Each quickstart has a readme.txt to show how to execute the quickstart and what is happening in it. Each quickstart also contains a script to run the quickstart automatically and check the result automatically.
+
+
+USAGE
+-----
+cd into the required quickstart and follow the readme.txt or call the run.[sh|bat] file
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.bat (from rev 37186, labs/jbosstm/trunk/ArjunaCore/quickstarts/run_all_quickstarts.bat)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.bat (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.bat 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,17 @@
+ at echo off
+
+echo "Running all quickstarts"
+
+set OLDPWD=%cd%
+
+for /R * %%i in (.) do (
+ if exist %%i\run.sh (
+ cd %%i
+ call run.bat %*
+ IF %ERRORLEVEL% NEQ 0 exit -1
+ )
+)
+
+cd /d %OLDPWD%
+
+echo "All quickstarts ran OK"
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.sh (from rev 37186, labs/jbosstm/trunk/ArjunaCore/quickstarts/run_all_quickstarts.sh)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.sh (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/run_all_quickstarts.sh 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,16 @@
+# ALLOW JOBS TO BE BACKGROUNDED
+set -m
+
+echo "Running all quickstarts"
+
+for i in `find * -name run.sh | sed 's#\(.*\)/.*#\1#' |sort -u`
+do
+ cd $i
+ ./run.sh
+ if [ "$?" != "0" ]; then
+ exit -1
+ fi
+ cd -
+done
+
+echo "All quickstarts ran OK"
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/simple/pom.xml (from rev 37186, labs/jbosstm/trunk/rest-tx/quickstarts/pom.xml)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/simple/pom.xml (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/simple/pom.xml 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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">
+ <parent>
+ <groupId>org.jboss.narayana.rts.quickstarts</groupId>
+ <artifactId>quickstarts</artifactId>
+ <version>5.0.0.M1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.narayana.rts</groupId>
+ <artifactId>simple</artifactId>
+ <version>5.0.0.M1-SNAPSHOT</version>
+ <name>RESTful Atomic Transaction Quickstarts</name>
+ <description>Provides examples of how to use transactions with web applications</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.narayana.rts</groupId>
+ <artifactId>rest-tx-api</artifactId>
+ <version>5.0.0.M1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/simple/readme.txt (from rev 37186, labs/jbosstm/trunk/rest-tx/quickstarts/readme.txt)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/simple/readme.txt (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/simple/readme.txt 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,29 @@
+OVERVIEW
+--------
+An example of how to start and end a transaction using REST style semantics.
+
+
+USAGE
+-----
+Deploy the rest-tx war (rest-tx-web-5.0.0.M1-SNAPSHOT.war) into a running AS7 (or AS6) application server listening
+for http requests on localhost (if you use a different host/port change the url in RestTransactionExample.TXN_MGR_URK).
+
+mvn compile exec:exec
+
+
+EXPECTED OUTPUT
+---------------
+transaction running: txStatus=TransactionActive
+Success
+
+
+WHAT JUST HAPPENED?
+-------------------
+We deployed a JAX-RS servlet that implements a RESTful interface to the Narayana transaction manager (TM).
+The example started a transaction by POSTing to a well known url that the JAX-RS servlet was listening on.
+The servlet looked up the TM running in the container it was deployed to and started a transaction.
+The servlet returned a URL (the transaction URL) that the example can use to control the termination of the active transaction.
+The example performed an HTTP GET request on the transaction URL to check that the transaction status was active.
+The example counted the number of running transactions (in order to check that at least one was active).
+The example performed an HTTP PUT request to the transaction URL thus terminating the transaction.
+The example counted the number of running transactions in order to verify that there was one less transaction.
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.bat (from rev 37186, labs/jbosstm/trunk/ArjunaCore/quickstarts/txoj/run.bat)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.bat (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.bat 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,6 @@
+ at echo off
+
+echo "Running simple quickstart"
+
+mvn compile exec:exec
+IF %ERRORLEVEL% NEQ 0 exit -1
Copied: labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.sh (from rev 37186, labs/jbosstm/trunk/ArjunaCore/quickstarts/txoj/run.sh)
===================================================================
--- labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.sh (rev 0)
+++ labs/jbosstm/trunk/rest-tx/quickstarts/simple/run.sh 2011-06-30 18:01:41 UTC (rev 37187)
@@ -0,0 +1,9 @@
+# ALLOW JOBS TO BE BACKGROUNDED
+set -m
+
+echo "Running simple quickstart"
+
+mvn compile exec:exec
+if [ "$?" != "0" ]; then
+ exit -1
+fi
More information about the jboss-svn-commits
mailing list