[jboss-svn-commits] JBL Code SVN: r25366 - in labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test: at and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 20 12:12:55 EST 2009


Author: adinn
Date: 2009-02-20 12:12:55 -0500 (Fri, 20 Feb 2009)
New Revision: 25366

Added:
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiServicePrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/SingleParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/MultiParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java
Removed:
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiServicePrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSingleParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSubordinateMultiParticipantPrepareAndCommitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleCoordinatorCompletionParticipantCloseTest.java
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleParticipantCompletionParticipantCloseTest.java
Modified:
   labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/XTSServiceTestBase.java
Log:
relocated test programs and renamed them to make it easier to find what is what and also added generic error print routine fixes for JBTM-387 JBTM-431 and JBTM-447

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiParticipantPrepareAndCommitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiParticipantPrepareAndCommitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,158 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlist several participants for the same web service with instructions to
- * prepare and commit without error
- */
-public class ATMultiParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserTransaction tx = UserTransactionFactory.userTransaction();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // wait a while so the service has time to start
-
-        // start the transaction
-
-        try {
-            tx.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service and tell it to prepare and  commit
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistDurable");
-        commands.getCommandList().add("prepare");
-        commands.getCommandList().add("commit");
-
-        // call the same web service multiple times -- it's ok to use the samew commands list
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        // now commit the transaction
-
-        try {
-            tx.commit();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiParticipantPrepareAndCommitTest : commit failure " + exception);
-        }
-
-        System.out.println("ATMultiParticipantPrepareAndCommitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiServicePrepareAndCommitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiServicePrepareAndCommitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiServicePrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,170 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlist a single participants for each of several web services with instructions to
- * prepare and commit without error
- */
-public class ATMultiServicePrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-        String serviceURL3;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        if (serviceURL3 == null) {
-            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
-        }
-
-        UserTransaction tx = UserTransactionFactory.userTransaction();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            tx.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service and tell it to prepare and  commit
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistDurable");
-        commands.getCommandList().add("prepare");
-        commands.getCommandList().add("commit");
-
-        // call the same web service multiple times -- it's ok to use the samew commands list
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        // now commit the transaction
-
-        try {
-            tx.commit();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATMultiServicePrepareAndCommitTest : commit failure " + exception);
-        }
-
-        System.out.println("ATMultiServicePrepareAndCommitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSingleParticipantPrepareAndCommitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSingleParticipantPrepareAndCommitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSingleParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,126 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlists a single participant with instructions to prepare and commit
- * without error
- */
-public class ATSingleParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserTransaction tx = UserTransactionFactory.userTransaction();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            tx.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSingleParticipantPrepareAndCommitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service and tell it to prepare and  commit
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistDurable");
-        commands.getCommandList().add("prepare");
-        commands.getCommandList().add("commit");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSingleParticipantPrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSingleParticipantPrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        // now commit the transaction
-
-        try {
-            tx.commit();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSingleParticipantPrepareAndCommitTest : commit failure " + exception);
-        }
-
-        System.out.println("ATSingleParticipantPrepareAndCommitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSubordinateMultiParticipantPrepareAndCommitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSubordinateMultiParticipantPrepareAndCommitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSubordinateMultiParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,225 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction, enlists a participant with a web service with instructions to prepare and commit
- * without errot then gets the web service to start a subordinate transaction and enlist several participants
- * for a second web service in the subtransaction also with instructions to prepare and commit without error
- */
-public class ATSubordinateMultiParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        UserTransaction tx = UserTransactionFactory.userTransaction();
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // wait a while so the service has time to start
-
-        // start the transaction
-
-        try {
-            tx.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service and tell it to create a subtransaction
-
-        commands = new CommandsType();
-        commands.getCommandList().add("subtransaction");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransaction failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransaction " + s);
-        }
-
-        List<String> resultList = results.getResultList();
-
-        String subTxId = resultList.get(0);
-
-        // enlist a durable participant in the original transaction and tell it to prepare and  commit
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistDurable");
-        commands.getCommandList().add("prepare");
-        commands.getCommandList().add("commit");
-
-        // call the web service multiple times
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : enlistDurable " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        // enlist a durable participant in the subtransaction and tell it to prepare and  commit
-
-        commands = new CommandsType();
-        commands.getCommandList().add("subtransactioncommands");
-        commands.getCommandList().add(subTxId);
-        commands.getCommandList().add(serviceURL2);
-        commands.getCommandList().add("enlistDurable");
-        commands.getCommandList().add("prepare");
-        commands.getCommandList().add("commit");
-
-        // call the same web service multiple times -- it's ok to use the same commands list
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands " + s);
-        }
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : subtransactioncommands " + s);
-        }
-
-        // now commit the transaction which should also commit the subtransaction
-
-        try {
-            tx.commit();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : commit failure " + exception);
-        }
-
-        System.out.println("ATSubordinateMultiParticipantPrepareAndCommitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,199 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists  multipleparticipants with instructions to prepare and commit
- * without error then gets one of them to exit before closing
- */
-public class BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : resultsList) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service again to create a coordinaator completion participant and script it to complete
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service a third time to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service scripting the first participant to exit
-        commands = new CommandsType();
-        commands.getCommandList().add("exit");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : exit " + participantId1 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,173 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlists mulitple participants swith instructions to prepare and commit
- * without error
- */
-public class BAMultiParticipantCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service again to create a coordinaator completion participant and script it to complete
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service a third time to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,245 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists  multipleparticipants with instructions to prepare and commit
- * without error then gets one of them to exit before closing
- */
-public class BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-        String participantId2;
-        String participantId3;
-
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a participant completion participant
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : resultsList) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : enlistParticipantCompletion " + s);
-        }
-
-        // invoke the service again to create a participant completion participant and script it to complete
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId2 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : enlistParticipantCompletion " + s);
-        }
-
-        // invoke the service a third time to create a participant completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : enlistParticipantCompletion " + s);
-        }
-
-        resultsList = results.getResultList();
-        participantId3 = resultsList.get(0);
-
-        // invoke the service scripting the first participant to exit
-        commands = new CommandsType();
-        commands.getCommandList().add("exit");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : exit " + participantId1 + " " + s);
-        }
-
-        // invoke the service scripting the second participant to copmplete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId2);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId2 + " " + s);
-        }
-
-        // invoke the service scripting the third participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId3);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId3 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,244 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists mulitple participants swith instructions to prepare and commit
- * without error
- */
-public class BAMultiParticipantParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-        String participantId2;
-        String participantId3;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinator completion participant and script it to close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : enlistPartiicpantCompletion " + s);
-        }
-
-        // invoke the service again to create a coordinaator completion participant and script it to close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId2 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : enlistPartiicpantCompletion " + s);
-        }
-
-        // invoke the service a third time to create a coordinaator completion participant and script it to
-        // close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId3 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : enlistPartiicpantCompletion " + s);
-        }
-
-        // invoke the service scripting the first participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : completed " + participantId1 + " " + s);
-        }
-
-        // invoke the service scripting the second participant to copmplete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId2);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : completed " + participantId2 + " " + s);
-        }
-
-        // invoke the service scripting the third participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId3);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : completed " + participantId3 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,211 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists a single participant in each of multiple services with instructions to
- * prepare and commit without error
- */
-public class BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-        String serviceURL3;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        if (serviceURL3 == null) {
-            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the second service to create a coordinator completion participant
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the third service to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service scripting the first participant to exit
-        commands = new CommandsType();
-        commands.getCommandList().add("exit");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : exit " + participantId1 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,185 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlists a single participant in each of multiple services with instructions to
- * prepare and commit without error
- */
-public class BAMultiServiceCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-        String serviceURL3;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        if (serviceURL3 == null) {
-            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the second service to create a coordinator completion participant and script it to complete
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the third service to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiServiceCoordinatorCompletionParticipantCloseTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseAndExitTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,256 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists a single participant in each of multiple services with instructions to
- * prepare and commit without error
- */
-public class BAMultiServiceParticipantCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-        String serviceURL3;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        if (serviceURL3 == null) {
-            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-        String participantId2;
-        String participantId3;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a participant completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the second service to create a participant completion participant
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId2 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the third service to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId3 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service scripting the first participant to exit
-        commands = new CommandsType();
-        commands.getCommandList().add("exit");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : exit " + participantId1 + " " + s);
-        }
-
-        // invoke the service scripting the second participant to copmplete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId2);
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId2 + " " + s);
-        }
-
-        // invoke the service scripting the third participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId3);
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId3 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiServiceParticipantCompletionParticipantCloseAndExitTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,257 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists a single participant in each of multiple services with instructions to
- * prepare and commit without error
- */
-public class BAMultiServiceParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-        String serviceURL2;
-        String serviceURL3;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
-        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        if (serviceURL2 == null) {
-            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
-        }
-
-        if (serviceURL3 == null) {
-            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-        List<String> resultsList;
-        String participantId1;
-        String participantId2;
-        String participantId3;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId1 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the second service to create a coordinator completion participant and script it to complete
-        // and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId2 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the third service to create a coordinaator completion participant and script it to
-        // complete and close
-
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId3 = resultsList.get(0);
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // invoke the service scripting the first participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId1);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : completed " + participantId1 + " " + s);
-        }
-
-        // invoke the service scripting the second participant to copmplete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId2);
-
-        try {
-            results = client.serve(serviceURL2, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : completed " + participantId2 + " " + s);
-        }
-
-        // invoke the service scripting the third participant to complete
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId3);
-
-        try {
-            results = client.serve(serviceURL3, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : completed " + participantId3 + " " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : commit failure " + exception);
-        }
-
-        System.out.println("BAMultiServiceParticipantCompletionParticipantCloseTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleCoordinatorCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleCoordinatorCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,128 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-/**
- * Starts a transaction and enlists a single participant with instructions to prepare and commit
- * without error
- */
-public class BASingleCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleCoordinatorCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        // invoke the service to create a coordinaator completion participant and script it to complete and close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistCoordinatorCompletion");
-        commands.getCommandList().add("complete");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleCoordinatorCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        for (String s : results.getResultList()) {
-            System.out.println("BASingleCoordinatorCompletionParticipantCloseTest : enlistCoordinatorCompletion " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleCoordinatorCompletionParticipantCloseTest : commit failure " + exception);
-        }
-
-        System.out.println("BASingleCoordinatorCompletionParticipantCloseTest : completed");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleParticipantCompletionParticipantCloseTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleParticipantCompletionParticipantCloseTest.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -1,157 +0,0 @@
-/*
- * 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) 2009,
- * @author JBoss Inc.
- */
-
-package org.jboss.jbossts.xts.servicetests.test;
-
-import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
-import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
-import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
-import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
-import com.arjuna.mw.wst11.UserTransactionFactory;
-import com.arjuna.mw.wst11.UserTransaction;
-import com.arjuna.mw.wst11.UserBusinessActivityFactory;
-import com.arjuna.mw.wst11.UserBusinessActivity;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import java.util.List;
-
-/**
- * Starts a transaction and enlists a single participant with instructions to prepare and commit
- * without error
- */
-public class BASingleParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
-{
-    public void run() {
-
-        // wait a while so the service has time to start
-
-        try {
-            Thread.sleep(5000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-
-        String serviceURL1;
-
-        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
-
-        if (serviceURL1 == null) {
-            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
-        }
-
-        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
-
-
-        // invoke the service via the client
-
-        XTSServiceTestClient client = new XTSServiceTestClient();
-        CommandsType commands = new CommandsType();
-        ResultsType results = null;
-
-        // start the transaction
-
-        try {
-            ba.begin();
-        } catch (WrongStateException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : txbegin failure " + exception);
-            return;
-        }
-
-        List<String> resultsList;
-        String participantId;
-
-        // invoke the service to create a participant completion participant and script it to close
-        commands = new CommandsType();
-        commands.getCommandList().add("enlistParticipantCompletion");
-        commands.getCommandList().add("close");
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-        participantId = resultsList.get(0);
-
-        for (String s : resultsList) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : enlistParticipantCompletion " + s);
-        }
-
-        // invoke the service scripting the participant to send completed now
-        commands = new CommandsType();
-        commands.getCommandList().add("completed");
-        commands.getCommandList().add(participantId);
-
-        try {
-            results = client.serve(serviceURL1, commands);
-        } catch (Exception e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : server failure " + exception);
-            return;
-        }
-
-        resultsList = results.getResultList();
-
-        for (String s : resultsList) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : completed(" + participantId + ") " + s);
-        }
-
-        // now close the activity
-
-        try {
-            ba.close();
-        } catch (TransactionRolledBackException e) {
-            exception = e;
-        } catch (UnknownTransactionException e) {
-            exception = e;
-        } catch (SystemException e) {
-            exception = e;
-        } catch (WrongStateException e) {
-            exception = e;
-        }
-
-        if (exception != null) {
-            System.out.println("BASingleParticipantCompletionParticipantCloseTest : close failure " + exception);
-        }
-
-        System.out.println("BASingleParticipantCompletionParticipantCloseTest : finished");
-
-        isSuccessful = (exception == null);
-    }
-}
\ No newline at end of file

Modified: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/XTSServiceTestBase.java
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/XTSServiceTestBase.java	2009-02-20 16:27:10 UTC (rev 25365)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/XTSServiceTestBase.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -21,4 +21,9 @@
     public Exception getException() {
         return exception;  //To change body of implemented methods use File | Settings | File Templates.
     }
+
+    public void error(String message)
+    {
+        System.err.println(this.getClass().getName() + " : " + message);
+    }
 }

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiParticipantPrepareAndCommitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiParticipantPrepareAndCommitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiParticipantPrepareAndCommitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,160 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.at;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlist several participants for the same web service with instructions to
+ * prepare and commit without error
+ */
+public class MultiParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserTransaction tx = UserTransactionFactory.userTransaction();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // wait a while so the service has time to start
+
+        // start the transaction
+
+        try {
+            tx.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service and tell it to prepare and  commit
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistDurable");
+        commands.getCommandList().add("prepare");
+        commands.getCommandList().add("commit");
+
+        // call the same web service multiple times -- it's ok to use the samew commands list
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        // now commit the transaction
+
+        try {
+            tx.commit();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiServicePrepareAndCommitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATMultiServicePrepareAndCommitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiServicePrepareAndCommitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/MultiServicePrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,172 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.at;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlist a single participants for each of several web services with instructions to
+ * prepare and commit without error
+ */
+public class MultiServicePrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+        String serviceURL3;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        if (serviceURL3 == null) {
+            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
+        }
+
+        UserTransaction tx = UserTransactionFactory.userTransaction();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            tx.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service and tell it to prepare and  commit
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistDurable");
+        commands.getCommandList().add("prepare");
+        commands.getCommandList().add("commit");
+
+        // call the same web service multiple times -- it's ok to use the samew commands list
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        // now commit the transaction
+
+        try {
+            tx.commit();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/SingleParticipantPrepareAndCommitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSingleParticipantPrepareAndCommitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/SingleParticipantPrepareAndCommitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/SingleParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,128 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.at;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlists a single participant with instructions to prepare and commit
+ * without error
+ */
+public class SingleParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserTransaction tx = UserTransactionFactory.userTransaction();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            tx.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service and tell it to prepare and  commit
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistDurable");
+        commands.getCommandList().add("prepare");
+        commands.getCommandList().add("commit");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        // now commit the transaction
+
+        try {
+            tx.commit();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/MultiParticipantPrepareAndCommitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ATSubordinateMultiParticipantPrepareAndCommitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/MultiParticipantPrepareAndCommitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/MultiParticipantPrepareAndCommitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,227 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.at.subordinate;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction, enlists a participant with a web service with instructions to prepare and commit
+ * without errot then gets the web service to start a subordinate transaction and enlist several participants
+ * for a second web service in the subtransaction also with instructions to prepare and commit without error
+ */
+public class MultiParticipantPrepareAndCommitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        UserTransaction tx = UserTransactionFactory.userTransaction();
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // wait a while so the service has time to start
+
+        // start the transaction
+
+        try {
+            tx.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service and tell it to create a subtransaction
+
+        commands = new CommandsType();
+        commands.getCommandList().add("subtransaction");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("subtransaction failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("subtransaction " + s);
+        }
+
+        List<String> resultList = results.getResultList();
+
+        String subTxId = resultList.get(0);
+
+        // enlist a durable participant in the original transaction and tell it to prepare and  commit
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistDurable");
+        commands.getCommandList().add("prepare");
+        commands.getCommandList().add("commit");
+
+        // call the web service multiple times
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistDurable " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        // enlist a durable participant in the subtransaction and tell it to prepare and  commit
+
+        commands = new CommandsType();
+        commands.getCommandList().add("subtransactioncommands");
+        commands.getCommandList().add(subTxId);
+        commands.getCommandList().add(serviceURL2);
+        commands.getCommandList().add("enlistDurable");
+        commands.getCommandList().add("prepare");
+        commands.getCommandList().add("commit");
+
+        // call the same web service multiple times -- it's ok to use the same commands list
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("subtransactioncommands failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("subtransactioncommands " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("subtransactioncommands failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("subtransactioncommands " + s);
+        }
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("subtransactioncommands failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("subtransactioncommands " + s);
+        }
+
+        // now commit the transaction which should also commit the subtransaction
+
+        try {
+            tx.commit();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file


Property changes on: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/at/subordinate/MultiParticipantPrepareAndCommitTest.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,201 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists  multipleparticipants with instructions to prepare and commit
+ * without error then gets one of them to exit before closing
+ */
+public class MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : resultsList) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service again to create a coordinaator completion participant and script it to complete
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service a third time to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service scripting the first participant to exit
+        commands = new CommandsType();
+        commands.getCommandList().add("exit");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("exit " + participantId1 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantCoordinatorCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,175 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlists mulitple participants swith instructions to prepare and commit
+ * without error
+ */
+public class MultiParticipantCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service again to create a coordinaator completion participant and script it to complete
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service a third time to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,247 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists  multipleparticipants with instructions to prepare and commit
+ * without error then gets one of them to exit before closing
+ */
+public class MultiParticipantParticipantCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+        String participantId2;
+        String participantId3;
+
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a participant completion participant
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : resultsList) {
+            error("enlistParticipantCompletion " + s);
+        }
+
+        // invoke the service again to create a participant completion participant and script it to complete
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId2 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistParticipantCompletion " + s);
+        }
+
+        // invoke the service a third time to create a participant completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistParticipantCompletion " + s);
+        }
+
+        resultsList = results.getResultList();
+        participantId3 = resultsList.get(0);
+
+        // invoke the service scripting the first participant to exit
+        commands = new CommandsType();
+        commands.getCommandList().add("exit");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("exit " + participantId1 + " " + s);
+        }
+
+        // invoke the service scripting the second participant to copmplete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId2);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId2 + " " + s);
+        }
+
+        // invoke the service scripting the third participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId3);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId3 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiParticipantParticipantCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiParticipantParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,246 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists mulitple participants swith instructions to prepare and commit
+ * without error
+ */
+public class MultiParticipantParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+        String participantId2;
+        String participantId3;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinator completion participant and script it to close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistPartiicpantCompletion " + s);
+        }
+
+        // invoke the service again to create a coordinaator completion participant and script it to close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId2 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistPartiicpantCompletion " + s);
+        }
+
+        // invoke the service a third time to create a coordinaator completion participant and script it to
+        // close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId3 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistPartiicpantCompletion " + s);
+        }
+
+        // invoke the service scripting the first participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId1 + " " + s);
+        }
+
+        // invoke the service scripting the second participant to copmplete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId2);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId2 + " " + s);
+        }
+
+        // invoke the service scripting the third participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId3);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId3 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,213 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists a single participant in each of multiple services with instructions to
+ * prepare and commit without error
+ */
+public class MultiServiceCoordinatorCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+        String serviceURL3;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        if (serviceURL3 == null) {
+            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the second service to create a coordinator completion participant
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the third service to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service scripting the first participant to exit
+        commands = new CommandsType();
+        commands.getCommandList().add("exit");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            System.out.println("BAMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest : exit " + participantId1 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceCoordinatorCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,187 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlists a single participant in each of multiple services with instructions to
+ * prepare and commit without error
+ */
+public class MultiServiceCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+        String serviceURL3;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        if (serviceURL3 == null) {
+            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the second service to create a coordinator completion participant and script it to complete
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the third service to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseAndExitTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseAndExitTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,258 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists a single participant in each of multiple services with instructions to
+ * prepare and commit without error
+ */
+public class MultiServiceParticipantCompletionParticipantCloseAndExitTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+        String serviceURL3;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        if (serviceURL3 == null) {
+            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+        String participantId2;
+        String participantId3;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a participant completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the second service to create a participant completion participant
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId2 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the third service to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId3 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service scripting the first participant to exit
+        commands = new CommandsType();
+        commands.getCommandList().add("exit");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("exit " + participantId1 + " " + s);
+        }
+
+        // invoke the service scripting the second participant to copmplete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId2);
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId2 + " " + s);
+        }
+
+        // invoke the service scripting the third participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId3);
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            System.out.println("BAMultiParticipantParticipantCompletionParticipantCloseAndExitTest : completed " + participantId3 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BAMultiServiceParticipantCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/MultiServiceParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,259 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists a single participant in each of multiple services with instructions to
+ * prepare and commit without error
+ */
+public class MultiServiceParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+        String serviceURL2;
+        String serviceURL3;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+        serviceURL2 = System.getProperty(XTSServiceTest.SERVICE_URL2_KEY);
+        serviceURL3 = System.getProperty(XTSServiceTest.SERVICE_URL3_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        if (serviceURL2 == null) {
+            serviceURL2 = "http://localhost:8080/xtstest/xtsservicetest2";
+        }
+
+        if (serviceURL3 == null) {
+            serviceURL3 = "http://localhost:8080/xtstest/xtsservicetest3";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+        List<String> resultsList;
+        String participantId1;
+        String participantId2;
+        String participantId3;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId1 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the second service to create a coordinator completion participant and script it to complete
+        // and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId2 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the third service to create a coordinaator completion participant and script it to
+        // complete and close
+
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId3 = resultsList.get(0);
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // invoke the service scripting the first participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId1);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId1 + " " + s);
+        }
+
+        // invoke the service scripting the second participant to copmplete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId2);
+
+        try {
+            results = client.serve(serviceURL2, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId2 + " " + s);
+        }
+
+        // invoke the service scripting the third participant to complete
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId3);
+
+        try {
+            results = client.serve(serviceURL3, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("completed " + participantId3 + " " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleCoordinatorCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleCoordinatorCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,130 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * Starts a transaction and enlists a single participant with instructions to prepare and commit
+ * without error
+ */
+public class SingleCoordinatorCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        // invoke the service to create a coordinaator completion participant and script it to complete and close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistCoordinatorCompletion");
+        commands.getCommandList().add("complete");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        for (String s : results.getResultList()) {
+            error("enlistCoordinatorCompletion " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("commit failure " + exception);
+        }
+
+        error("completed");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java (from rev 25351, labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/BASingleParticipantCompletionParticipantCloseTest.java)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/SingleParticipantCompletionParticipantCloseTest.java	2009-02-20 17:12:55 UTC (rev 25366)
@@ -0,0 +1,159 @@
+/*
+ * 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) 2009,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.jbossts.xts.servicetests.test.ba;
+
+import org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager;
+import org.jboss.jbossts.xts.servicetests.client.XTSServiceTestClient;
+import org.jboss.jbossts.xts.servicetests.generated.CommandsType;
+import org.jboss.jbossts.xts.servicetests.generated.ResultsType;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTestBase;
+import org.jboss.jbossts.xts.servicetests.test.XTSServiceTest;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import java.util.List;
+
+/**
+ * Starts a transaction and enlists a single participant with instructions to prepare and commit
+ * without error
+ */
+public class SingleParticipantCompletionParticipantCloseTest extends XTSServiceTestBase implements XTSServiceTest
+{
+    public void run() {
+
+        // wait a while so the service has time to start
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            // ignore
+        }
+
+        String serviceURL1;
+
+        serviceURL1 = System.getProperty(XTSServiceTest.SERVICE_URL1_KEY);
+
+        if (serviceURL1 == null) {
+            serviceURL1 = "http://localhost:8080/xtstest/xtsservicetest1";
+        }
+
+        UserBusinessActivity ba = UserBusinessActivityFactory.userBusinessActivity();
+
+
+        // invoke the service via the client
+
+        XTSServiceTestClient client = new XTSServiceTestClient();
+        CommandsType commands = new CommandsType();
+        ResultsType results = null;
+
+        // start the transaction
+
+        try {
+            ba.begin();
+        } catch (WrongStateException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("txbegin failure " + exception);
+            return;
+        }
+
+        List<String> resultsList;
+        String participantId;
+
+        // invoke the service to create a participant completion participant and script it to close
+        commands = new CommandsType();
+        commands.getCommandList().add("enlistParticipantCompletion");
+        commands.getCommandList().add("close");
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+        participantId = resultsList.get(0);
+
+        for (String s : resultsList) {
+            error("enlistParticipantCompletion " + s);
+        }
+
+        // invoke the service scripting the participant to send completed now
+        commands = new CommandsType();
+        commands.getCommandList().add("completed");
+        commands.getCommandList().add(participantId);
+
+        try {
+            results = client.serve(serviceURL1, commands);
+        } catch (Exception e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("server failure " + exception);
+            return;
+        }
+
+        resultsList = results.getResultList();
+
+        for (String s : resultsList) {
+            error("completed(" + participantId + ") " + s);
+        }
+
+        // now close the activity
+
+        try {
+            ba.close();
+        } catch (TransactionRolledBackException e) {
+            exception = e;
+        } catch (UnknownTransactionException e) {
+            exception = e;
+        } catch (SystemException e) {
+            exception = e;
+        } catch (WrongStateException e) {
+            exception = e;
+        }
+
+        if (exception != null) {
+            error("close failure " + exception);
+        }
+
+        error("finished");
+
+        isSuccessful = (exception == null);
+    }
+}
\ No newline at end of file




More information about the jboss-svn-commits mailing list