[jboss-svn-commits] JBL Code SVN: r37185 - in labs/jbosstm/trunk/ArjunaJTA/quickstarts: javax_transaction/src/main/java/org/jboss/narayana/jta/quickstarts and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 30 13:17:29 EDT 2011
Author: mmusgrov
Date: 2011-06-30 13:17:29 -0400 (Thu, 30 Jun 2011)
New Revision: 37185
Modified:
labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/pom.xml
labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/readme.txt
labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.bat
labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.sh
labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/src/main/java/org/jboss/narayana/jta/quickstarts/TransactionExample.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/object_store/readme.txt
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/pom.xml
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/readme.txt
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.bat
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.sh
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/BasicXAExample.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/DummyRecovery.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/JmsRecovery.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/RecoverySetup.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXAResource.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXid.java
labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/Util.java
Log:
[JBTM-854] Document examples in readme.txt
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/pom.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/pom.xml 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/pom.xml 2011-06-30 17:17:29 UTC (rev 37185)
@@ -15,18 +15,25 @@
<name>Javax Transaction Examples</name>
<build>
<plugins>
+ <!-- This plugin allows our example to be executed by maven -->
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
- <filesets>
- <fileset>
- <directory>PutObjectStoreDirHere</directory>
- </fileset>
- <fileset>
- <directory>ObjectStore</directory>
- </fileset>
- </filesets>
+ <executable>java</executable>
+ <workingDirectory>${project.build.directory}/exec-working-directory</workingDirectory>
+ <arguments>
+ <argument>-classpath</argument>
+ <classpath/>
+ <argument>org.jboss.narayana.jta.quickstarts.TransactionExample</argument>
+ </arguments>
</configuration>
</plugin>
</plugins>
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/readme.txt 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/readme.txt 2011-06-30 17:17:29 UTC (rev 37185)
@@ -1,25 +1,44 @@
-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.
+JBoss, Home of Professional Open Source
+Copyright 2011, 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.
- There is 1 javax.transaction examples:
+(C) 2011
+ at author JBoss Inc.
- 1. Starting and ending transactions, examining transacton status, timeouts etc:
- org.jboss.narayana.jta.examples.TransactionExample
+OVERVIEW
+--------
+This example shows how to obtain a JEE conforming transaction and how to invoke various methods
+of the javax.transaction.Transaction interface such as starting and ending transactions, examining
+transacton status, timeouts etc.
- When running an example an exit code of zero represents success (otherwise failure together with an exception trace).
+USAGE
+-----
+mvn compile exec:exec
+OR
+./run.[sh|bat]
- To run an example use the maven java exec plugin. For example to run the first example:
+EXPECTED OUTPUT
+---------------
+[INFO] BUILD SUCCESS
- mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.TransactionExample
+otherwise you can examine what went wrong by enabling stack traces with the -e flat:
+ mvn compile exec:exec -e
- By defalt transaction logs are stored in the current working directory (ObjectStore and PutObjectStoreDirHere).
+WHAT JUST HAPPENED?
+-------------------
+The example looks up an instance of the JEE UserTransaction using and calls its various methods. If anything
+goes wrong an exception is generated. The example also shows how to lookup and instance of the JEE
+TransactionManager interface.
+
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.bat
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.bat 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.bat 2011-06-30 17:17:29 UTC (rev 37185)
@@ -1,6 +1,6 @@
@echo off
-echo "Running javax_transaction quickstart"
+echo "Running maven quickstart"
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.TransactionExample
+mvn compile exec:exec
IF %ERRORLEVEL% NEQ 0 exit -1
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.sh
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.sh 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/run.sh 2011-06-30 17:17:29 UTC (rev 37185)
@@ -1,9 +1,9 @@
# ALLOW JOBS TO BE BACKGROUNDED
set -m
-echo "Running javax_transaction quickstart"
+echo "Running maven quickstart"
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.TransactionExample
+mvn compile exec:exec
if [ "$?" != "0" ]; then
exit -1
fi
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/src/main/java/org/jboss/narayana/jta/quickstarts/TransactionExample.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/src/main/java/org/jboss/narayana/jta/quickstarts/TransactionExample.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/javax_transaction/src/main/java/org/jboss/narayana/jta/quickstarts/TransactionExample.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,7 +18,7 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples;
+package org.jboss.narayana.jta.quickstarts;
import javax.transaction.*;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/object_store/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/object_store/readme.txt 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/object_store/readme.txt 2011-06-30 17:17:29 UTC (rev 37185)
@@ -1,30 +1,50 @@
-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.
+JBoss, Home of Professional Open Source
+Copyright 2011, 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) 2011
+ at author JBoss Inc.
+OVERVIEW
+--------
+A transaction manager must store enough information such that it can guarantee recovery from failures.
+This is achieved by persisting information in an Object Store. Various implementation are provided
+to cater for various application requirements.
- There are 3 object store examples:
+1. FileStoreExample shows how to change the store type to a file base store but in directory different from the default;
+2. HornetqStoreExample shows how to use the Hornetq journal for transction logging;
+3. VolatileStoreExample shows how to use an unsafe (because it does not persist logs in the event of
+ failures and therefore does not support recovery) in-memory log store implementation.
- 1. A transaction manager stores its commit decision after before deciding to commit a transaction.
- This example shows how to change the store type to an (unsafe) in memory store:
- org.jboss.narayana.jta.quickstarts.VolatileStoreExample
- 2. This example shows how to change the store type to use the fast Hornetq journal:
- org.jboss.narayana.jta.quickstarts.HornetqStoreExample
- 3. This example shows how to change the store type to a file base store but in directory different from the default:
- org.jboss.narayana.jta.quickstarts.FileStoreExample
-
- When running an example an exit code of zero represents success (otherwise failure together with an exception trace)
-
- To run an example use the maven java exec plugin:
+USAGE
+-----
+./run.[sh|bat]
+or to run individual tests using the maven java exec plugin:
mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.VolatileStoreExample
mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.HornetqStoreExample
mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.FileStoreExample
+
+EXPECTED OUTPUT
+---------------
+
+When running examples one at a time look for the output
+[INFO] BUILD SUCCESS
+If you use the run script then you the line "[INFO] BUILD SUCCESS" should appear once for each example.
+
+WHAT JUST HAPPENED?
+-------------------
+Each example either changes the object store directory or object store type (or both) and then runs a
+transaction. Each example performs a relevant test to verify that the object store type or directory,
+as appropriate, was used.
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/pom.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/pom.xml 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/pom.xml 2011-06-30 17:17:29 UTC (rev 37185)
@@ -12,22 +12,7 @@
<artifactId>recovery</artifactId>
<packaging>jar</packaging>
<name>Recovery Examples</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- some recovery tests need to halt the JVM in order to demonstrate recovery
- so we must skip the tests -->
- <excludes>
- <exclude>**/RecoverySetup.java</exclude>
- <exclude>**/*.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/readme.txt 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/readme.txt 2011-06-30 17:17:29 UTC (rev 37185)
@@ -11,16 +11,20 @@
along with this distribution; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+OVERVIEW
+--------
+A transaction manager (TM) must be able to recover from failures during the commit phase of a transaction. These examples
+demonstrate that the TM is able to recover failed transactions.
- There are 3 recovery examples:
+There are three examples:
1. An example showing how to manually enlist (2 dummy) resources (without failures)
- org.jboss.narayana.jta.examples.recovery.BasicXAExample
+ org.jboss.narayana.jta.quickstarts.recovery.BasicXAExample
2. An example demonstrating recovery from failures after prepare but before commit using Dummy XA resources:
- org.jboss.narayana.jta.examples.recovery.DummyRecovery
+ org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery
- This example needs to be run twice the first run (controled by a command line arg of -f, for fail)
+ This example needs to be run twice, the first run (controled by a command line arg of -f, for fail)
will halt the VM thus generating a "recovery record".
The second run (controled by a command line arg of -r, for recover) will cause the transaction manager
@@ -31,23 +35,65 @@
The second run will trigger the recovery system which in turn commits the two prepared JMS XA resources.
Then the two messages are consumed.
- When running an example an exit code of zero represents success (otherwise failure together with an exception trace).
- To run an example use the maven java exec pluging. For example to run the second recovery example:
+USAGE
+-----
+./run.[sh|bat]
- mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-f"
- mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-r"
+To run an example manually you will need to run the example twice, once with a flag to tell the example to
+generate a failure followed by a second run with a flag to tell the example to recover the failed transaction.
+For example to run the JMS example:
+ mvn exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-f"
+ mvn exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-r"
- And to run the JMS recovery example:
+and to run the Dummy XA resource example:
+ mvn exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-f"
+ mvn exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-r"
- mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-f"
- mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-r"
+To run the example showing how to manually enlist resources into a transaction and to commit without failures:
+ mvn exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.BasicXAExample
- On the second step of each example you will see a warning
- (HornetQException[errorCode=4 message=The connection was disconnected because of server shutdown])
+
which can be ignored. It caused by the recovery subsystem not performing an orderly shutdown of JMS
communications. This will be fixed in the next revision of JBossTS.
And finally, to read the (binary) hornetq logs use the PrintData tool:
- mvn -e exec:java -Dexec.mainClass=org.hornetq.core.persistence.impl.journal.PrintData -Dexec.classpathScope=test -Dexec.args="target/data/hornetq/bindings target/data/hornetq/largemessages"
+ mvn exec:java -Dexec.mainClass=org.hornetq.core.persistence.impl.journal.PrintData -Dexec.classpathScope=test -Dexec.args="target/data/hornetq/bindings target/data/hornetq/largemessages"
+
+ Pass a -e flag to the mvn command line to enable exception stack traces.
+
+EXPECTED OUTPUT
+---------------
+Running all the examples will generate a lot of output including a java stack trace. The first step of each example
+is to cause the VM to halt thus generating a recovery record. The second step is meant to demonstrate the recovery
+system recovering the transaction.
+
+If all the examples succeed the last line of output should be
+"All recovery examples succeeded"
+
+When the dummy example finishes look for the output
+"Dummy example succeeded"
+When the dummy example finishes look for the output
+"JMS example succeeded"
+
+The final step of the JMS example will output the message
+"WARNING: I'm closing a core ClientSession you left open."
+and then generate a stack trace to show where the ClientSession was originally opened. This problem can be ignored but
+will be fixed in the next release of the transaction manager product. The error is caused by the recovery subsystem
+not performing an orderly shutdown of JMS communications.
+
+WHAT JUST HAPPENED?
+-------------------
+
+The JMS example starts a transaction and enlists two resources. One of the resources is a JMS XA session that
+The JMS example generates two messages within a transactional XA session. Before sending the messages two
+resources are enlisted into the transaction, an XA resource corresponding to the JMS session used to send the
+messages and a dummy XA resource. On the first run the dummy resources is configured to halt the VM during
+the second, commit, phase of the transaction completion protocol. This will cause the JMS messages to require
+recovery.
+
+During the second run the example manually requests a "recovery scan" (normally the recovery subsystem runs
+automatically). This scan will cause the the two messages to be committed hence making them available for consumption.
+The 2 messages are then consumed.
+
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.bat
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.bat 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.bat 2011-06-30 17:17:29 UTC (rev 37185)
@@ -3,13 +3,18 @@
echo "Running recovery quickstart"
rem To run an example use the maven java exec pluging. For example to run the second recovery example
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-f"
+mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-f"
IF %ERRORLEVEL% NEQ 0 exit -1
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-r"
+mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-r"
IF %ERRORLEVEL% NEQ 0 exit -1
+echo "Dummy recovery example succeeded"
rem And to run the JMS recovery example:
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-f"
+mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-f"
IF %ERRORLEVEL% NEQ 0 exit -1
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-r"
+mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-r"
IF %ERRORLEVEL% NEQ 0 exit -1
+echo "JMS recovery example succeeded"
+
+echo "All recovery examples succeeded"
+
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.sh
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.sh 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/run.sh 2011-06-30 17:17:29 UTC (rev 37185)
@@ -4,23 +4,31 @@
echo "Running recovery quickstart"
# To run an example use the maven java exec pluging. For example to run the second recovery example
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-f"
+mvn compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-f"
# We expect this to fail
#if [ "$?" != "0" ]; then
# exit -1
#fi
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.DummyRecovery -Dexec.args="-r"
+mvn compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-r"
if [ "$?" != "0" ]; then
+ echo "Dummy example failed"
exit -1
+else
+ echo "Dummy example succeeded"
fi
# And to run the JMS recovery example:
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-f"
+mvn compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-f"
# We expect this to fail
#if [ "$?" != "0" ]; then
# exit -1
#fi
-mvn -e compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.examples.recovery.JmsRecovery -Dexec.args="-r"
+mvn compile exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-r"
if [ "$?" != "0" ]; then
exit -1
+ echo "JMS example failed"
+else
+ echo "JMS example succeeded"
fi
+
+echo "All recovery examples succeeded"
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/BasicXAExample.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/BasicXAExample.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/BasicXAExample.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,10 +18,10 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.recovery;
+package org.jboss.narayana.jta.quickstarts.recovery;
-import org.jboss.narayana.jta.examples.util.DummyXAResource;
-import org.jboss.narayana.jta.examples.util.Util;
+import org.jboss.narayana.jta.quickstarts.util.DummyXAResource;
+import org.jboss.narayana.jta.quickstarts.util.Util;
import javax.transaction.*;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/DummyRecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/DummyRecovery.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/DummyRecovery.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,14 +18,14 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.recovery;
+package org.jboss.narayana.jta.quickstarts.recovery;
import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean;
import com.arjuna.ats.arjuna.recovery.RecoveryManager;
import com.arjuna.common.internal.util.propertyservice.BeanPopulator;
-import org.jboss.narayana.jta.examples.util.DummyXAResource;
-import org.jboss.narayana.jta.examples.util.Util;
+import org.jboss.narayana.jta.quickstarts.util.DummyXAResource;
+import org.jboss.narayana.jta.quickstarts.util.Util;
import javax.transaction.*;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/JmsRecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/JmsRecovery.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/JmsRecovery.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,7 +18,7 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.recovery;
+package org.jboss.narayana.jta.quickstarts.recovery;
import com.arjuna.ats.jta.common.JTAEnvironmentBean;
import com.arjuna.common.internal.util.propertyservice.BeanPopulator;
@@ -42,9 +42,9 @@
import org.hornetq.jms.server.embedded.EmbeddedJMS;
import org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;
import org.hornetq.utils.UUIDGenerator;
-import org.jboss.narayana.jta.examples.util.DummyXAResource;
-import org.jboss.narayana.jta.examples.util.DummyXid;
-import org.jboss.narayana.jta.examples.util.Util;
+import org.jboss.narayana.jta.quickstarts.util.DummyXAResource;
+import org.jboss.narayana.jta.quickstarts.util.DummyXid;
+import org.jboss.narayana.jta.quickstarts.util.Util;
import javax.jms.*;
import javax.transaction.*;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/RecoverySetup.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/RecoverySetup.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/RecoverySetup.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,14 +18,14 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.recovery;
+package org.jboss.narayana.jta.quickstarts.recovery;
import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean;
import com.arjuna.ats.arjuna.recovery.RecoveryManager;
import com.arjuna.common.internal.util.propertyservice.BeanPopulator;
-import org.jboss.narayana.jta.examples.util.Util;
+import org.jboss.narayana.jta.quickstarts.util.Util;
public class RecoverySetup {
protected static RecoveryManager recoveryManager;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXAResource.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXAResource.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXAResource.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,7 +18,7 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.util;
+package org.jboss.narayana.jta.quickstarts.util;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXid.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXid.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/DummyXid.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -10,7 +10,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package org.jboss.narayana.jta.examples.util;
+package org.jboss.narayana.jta.quickstarts.util;
import javax.transaction.xa.Xid;
Modified: labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/Util.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/Util.java 2011-06-30 16:12:31 UTC (rev 37184)
+++ labs/jbosstm/trunk/ArjunaJTA/quickstarts/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/util/Util.java 2011-06-30 17:17:29 UTC (rev 37185)
@@ -18,7 +18,7 @@
* (C) 2011,
* @author JBoss, by Red Hat.
*/
-package org.jboss.narayana.jta.examples.util;
+package org.jboss.narayana.jta.quickstarts.util;
import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
import com.arjuna.common.internal.util.propertyservice.BeanPopulator;
More information about the jboss-svn-commits
mailing list