[jboss-cvs] JBossAS SVN: r104459 - in branches/JBPAPP_5_1_hornetq-int/testsuite: imports and 53 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 4 20:45:35 EDT 2010


Author: clebert.suconic at jboss.com
Date: 2010-05-04 20:45:32 -0400 (Tue, 04 May 2010)
New Revision: 104459

Added:
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/util/jms/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/util/jms/JMSDestinationsUtil.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/hornetq-jms.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-jms.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-queues.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/resources/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/resources/xa-mq-destinations-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-jms.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-queues.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-jms.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-queues.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/hornetq-jms.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-roles.properties
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-users.properties
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-configuration.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-jms.xml
Modified:
   branches/JBPAPP_5_1_hornetq-int/testsuite/build.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/client.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/cts.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/invokers.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/jca.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/web.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/imports/server-config.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/SmokeTestSuite.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/client/test/AppClientUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/ejb/StrictlyPooledMDB.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CmpUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CtsCmp2OptionDUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/IndependentJarsUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LocalEjbTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LongWaitStatefulSessionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/MDBUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionLocalUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionBrokenCreateUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/UserTransactionLookupTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ee5client/unit/AppClientUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/AbstractLifeCycleTestWrapper.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/InvokersLifeCycleUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb3/jbas6239/QueueTestMDB.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/invokers/test/MultiInvokersUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jacc/test/WebIntegrationUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSReconnectStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/ReceiveNackClientStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConcurrentDeliveryUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConnectionConsumerUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/Jms11UnitTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SessionCloseStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/TemporarySessionConnectionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceWrapperSmokeUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/ejb/TransactionActiveBean.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/test/ExecuteJMSDuringRollbackStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaJMSSessionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaQueueUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaSyncRecUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTopicUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/ENCUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/NamingStressTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/refs/test/ResourceResolutionUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/ejb/OnCreateTimerMessageBean.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/test/BasicTimerUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/cts/META-INF/jboss.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ee5client/ee5client-jms-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/test-destinations-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/provider.properties
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jca/executejmsrollback/test-jms-local-ds.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/jboss-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss-mdb-client-id.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/ejb-jar.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/jboss-service.xml
   branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/timer/service/jboss-service.xml
Log:
HornetQ testsuite - first commit

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/build.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/build.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/build.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1142,6 +1142,7 @@
    </patternset>
    <!-- jbossmessaging includes -->
    <patternset id="jbossmessaging.includes">
+    <include name="org/jboss/test/jbossmessaging/**/Jms11UnitTest.class"/>
      <include name="org/jboss/test/jbossmessaging/test/*UnitTestCase.class"/>
      <include name="org/jboss/test/jbossmessaging/perf/*StressTestCase.class"/>
      <include name="org/jboss/test/jbossmessaging/ra/*UnitTestCase.class"/>
@@ -2291,12 +2292,14 @@
 
             <fileset dir="${build.classes}">
                <exclude name="org/jboss/test/securitymgr/test/PolicyUnitTestCase.class"/>
-               <patternset refid="securitymgr.includes"/>
+                <!-- <patternset refid="securitymgr.includes"/> -->
+                <patternset refid="deleteme.include"/>
             </fileset>
          </batchtest>
       </junit>
+   	<!--
       <echo>Waiting for server to shutdown...</echo>
-      <server:stop name="securitymgr"/>
+      <server:stop name="securitymgr"/> -->
    </target>
 
 	<target name="tests-logmod-ldap"

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/client.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/client.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/client.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -16,7 +16,7 @@
          <metainf dir="${build.resources}/client">
             <include name="jboss-app.xml"/>
          </metainf>
-         <fileset dir="${build.lib}/dest-free">
+         <fileset dir="${build.lib}">
             <include name="cts.jar"/>
          </fileset>
          <fileset dir="${build.lib}">

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/cts.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/cts.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/cts.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -19,8 +19,7 @@
       </jar>
       
       <!-- build cts.jar -->
-      <mkdir dir="${build.lib}/dest-free"/>
-      <jar destfile="${build.lib}/dest-free/cts.jar">
+      <jar destfile="${build.lib}/cts.jar">
          <metainf dir="${build.resources}/cts/META-INF">
             <include name="ejb-jar.xml"/>
             <include name="jboss.xml"/>
@@ -43,12 +42,6 @@
             <patternset refid="jboss.test.set"/>
          </zipfileset>
       </jar>
-      <jar destfile="${build.lib}/cts.jar">
-         <zipfileset src="${build.lib}/dest-free/cts.jar"/>
-         <fileset dir="${source.resources}/messaging">
-            <include name="test-destinations-full-service.xml"/>
-         </fileset>
-      </jar>
       <!-- build a duplicate cts.jar with new home bindings -->
       <jar destfile="${build.lib}/cts2.jar">
          <metainf dir="${build.resources}/cts/metainf2">

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/invokers.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/invokers.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/invokers.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -27,9 +27,6 @@
          <fileset dir="${build.lib}">
             <include name="invokers.sar"/>
          </fileset>
-         <fileset dir="${source.resources}/messaging">
-            <include name="test-destinations-full-service.xml"/>
-         </fileset>
       </jar>
    </target>
 </project>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/jca.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/jca.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/jca.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -231,8 +231,8 @@
          <fileset dir="${build.resources}/jca/txactive">
             <include name="**/*.xml"/>
          </fileset>
-         <fileset dir="${build.resources}/messaging">
-            <include name="test-destinations-service.xml"/>
+         <fileset dir="${build.resources}/hornetq">
+            <include name="*.xml"/>
          </fileset>
       </jar>
       
@@ -246,9 +246,6 @@
          <fileset dir="${build.resources}/jca/test">
             <include name="**/*.*"/>
          </fileset>
-         <fileset dir="${build.resources}/messaging">
-            <include name="test-destinations-service.xml"/>
-         </fileset>
          <fileset dir="${build.resources}/jca/executejmsrollback">
             <include name="**/*.*"/>
          </fileset>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/web.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/web.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/sections/web.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -230,7 +230,7 @@
             <include name="lib/util.jar"/>
             <include name="websubdir/relative.jar"/>
          </fileset>
-         <fileset dir="${build.lib}/dest-free">
+         <fileset dir="${build.lib}">
             <include name="cts.jar"/>
          </fileset>
          <fileset dir="${build.resources}/web">

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/imports/server-config.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/imports/server-config.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -332,7 +332,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="0" />
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -347,7 +346,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -505,7 +503,6 @@
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jboss.multiplexer.stack" value="tcp" />
          <sysproperty key="jgroups.tcpping.initial_hosts" value="${node0}[7600],${node1}[7600]"/>
-         <sysproperty key="jboss.messaging.ServerPeerID" value="0" />  
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -521,7 +518,6 @@
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jboss.multiplexer.stack" value="tcp" />
          <sysproperty key="jgroups.tcpping.initial_hosts" value="${node0}[7600],${node1}[7600]"/>
-         <sysproperty key="jboss.messaging.ServerPeerID" value="1" /> 
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -976,7 +972,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="0" />
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -991,7 +986,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
          <sysproperty key="node0.bind.address" value="${node0}" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
@@ -1017,7 +1011,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="0" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>
@@ -1031,7 +1024,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>
@@ -1045,7 +1037,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="0" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>
@@ -1059,7 +1050,6 @@
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="resolve.dns" value="false" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
-         <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
          <sysproperty key="jboss.partition.name" value="${partitionName}"/>
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>
@@ -1074,12 +1064,13 @@
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
          <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
       </server>
-      <server name="jbossmessaging" host="${node0}">
+      <server name="hornetq" host="${node0}">
          <jvmarg value="-Xms128m" />
          <jvmarg value="-Xmx512m" />
          <jvmarg value="-XX:MaxPermSize=512m" />
          <jvmarg value="-XX:-UseGCOverheadLimit" />      
          <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+         <jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006"/>
          <sysproperty key="java.net.preferIPv4Stack" value="true" />
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
          <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/SmokeTestSuite.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/SmokeTestSuite.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/SmokeTestSuite.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -77,7 +77,7 @@
       suite.addTest(org.jboss.test.cts.test.StatelessSessionBrokenCreateUnitTestCase.suite());
       suite.addTest(org.jboss.test.cts.test.StatelessSessionUnitTestCase.suite());
       suite.addTest(org.jboss.test.ejb3.test.SimpleSessionUnitTestCase.suite());
-      suite.addTest(org.jboss.test.jbossmessaging.test.JBossMessagingJoramUnitTestCase.suite());
+      suite.addTest(org.jboss.test.jbossmessaging.test.JoramUnitTestCase.suite());
       suite.addTestSuite(org.jboss.test.jca.test.BaseConnectionManagerUnitTestCase.class);
       suite.addTest(org.jboss.test.jca.test.PoolingUnitTestCase.suite());
       suite.addTest(org.jboss.test.jca.test.XADSUnitTestCase.suite());

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/client/test/AppClientUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/client/test/AppClientUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/client/test/AppClientUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -32,6 +32,7 @@
 import org.jboss.test.client.test.main.Client;
 import org.jboss.test.cts.interfaces.StatelessSession;
 import org.jboss.test.cts.interfaces.StatelessSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.JBossTestSetup;
 
@@ -148,7 +149,7 @@
          {
             super.setUp();
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy (loader.getResource("messaging/test-destinations-full-service.xml").toString());
+            JMSDestinationsUtil.setupBasicDestinations();
             deploy ("app-client.ear");
          }
          protected void tearDown() throws Exception
@@ -156,7 +157,7 @@
             super.tearDown();
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             undeploy ("app-client.ear");
-            undeploy (loader.getResource("messaging/test-destinations-full-service.xml").toString());
+            JMSDestinationsUtil.destroyDestinations();
          }
       });
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/ejb/StrictlyPooledMDB.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/ejb/StrictlyPooledMDB.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/ejb/StrictlyPooledMDB.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -110,7 +110,8 @@
    public void onMessage(Message message)
    {
       int count = incActiveCount();
-      log.debug("Begin onMessage, activeCount="+count+", ctx="+ctx);
+
+      for (int i = 0 ; i < 20; i++) log.debug("Begin onMessage, activeCount="+count+", ctx="+ctx);
       try
       {
          Message reply = null;

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -23,36 +23,33 @@
 
 
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
-
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Properties;
 
+import javax.ejb.EJBMetaData;
 import javax.ejb.Handle;
 import javax.ejb.HomeHandle;
-import javax.ejb.EJBMetaData;
-
 import javax.naming.InitialContext;
-
 import javax.rmi.PortableRemoteObject;
-
 import javax.transaction.UserTransaction;
 
-import org.jboss.test.cts.jms.ContainerMBox;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.cts.interfaces.CtsBmp;
 import org.jboss.test.cts.interfaces.CtsBmpHome;
-import org.jboss.test.cts.interfaces.CtsBmp;
 import org.jboss.test.cts.interfaces.UserTransactionTester;
-import org.jboss.test.cts.interfaces.StatelessSession;
+import org.jboss.test.cts.jms.ContainerMBox;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
-import junit.framework.Test;
 
-import org.jboss.test.JBossTestCase;
-
-
 /**
  *  Class BmpTest
  *
@@ -791,7 +788,24 @@
     //deploy the cts.jar once for the suite.
    public static Test suite() throws Exception
    {
-      return getDeploySetup(BmpUnitTestCase.class, "cts.jar");
+      
+      return new JBossTestSetup(new TestSuite(BmpUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+
    }
 
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CmpUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CmpUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CmpUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -23,15 +23,19 @@
 
 
 import java.util.Properties;
+
 import javax.naming.InitialContext;
 import javax.rmi.PortableRemoteObject;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.CtsCmp;
 import org.jboss.test.cts.interfaces.CtsCmpHome;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Basic conformance tests for stateless sessions
  *
@@ -115,7 +119,23 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(CmpUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(CmpUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CtsCmp2OptionDUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CtsCmp2OptionDUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/CtsCmp2OptionDUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,10 +25,13 @@
 import javax.naming.InitialContext;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.CtsCmpHome;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** 
  * Tests OptionD.
@@ -64,6 +67,22 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(CtsCmp2OptionDUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(CtsCmp2OptionDUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/IndependentJarsUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/IndependentJarsUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/IndependentJarsUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,11 +25,14 @@
 import javax.rmi.PortableRemoteObject;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.CallerSession;
 import org.jboss.test.cts.interfaces.CallerSessionHome;
 import org.jboss.test.cts.interfaces.CalleeException;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Tests of ejbs in seperate jars interacting
  *
@@ -109,7 +112,24 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(IndependentJarsUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(IndependentJarsUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LocalEjbTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LocalEjbTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LocalEjbTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,7 +25,9 @@
 import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.ejb.LocalEjbTests;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Basic conformance tests for stateless sessions
  *
@@ -44,7 +46,24 @@
    {
 		TestSuite testSuite = new TestSuite("LocalEjbTestCase");
 		testSuite.addTestSuite(LocalEjbTests.class);
-		return getDeploySetup(testSuite, "cts.jar");
+      return new JBossTestSetup(testSuite)
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
+		
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LongWaitStatefulSessionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LongWaitStatefulSessionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/LongWaitStatefulSessionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,9 +25,12 @@
 
 import org.jboss.test.cts.interfaces.StatefulSession;
 import org.jboss.test.cts.interfaces.StatefulSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 /**
  * Long wait test
@@ -61,7 +64,23 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(LongWaitStatefulSessionUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(LongWaitStatefulSessionUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/MDBUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/MDBUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/MDBUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -30,7 +30,11 @@
 
 import EDU.oswego.cs.dl.util.concurrent.CountDown;
 import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Basic conformance tests for MDBs
  *
@@ -82,7 +86,23 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(MDBUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(MDBUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -28,11 +28,14 @@
 import javax.transaction.UserTransaction;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.CtsCmpHome;
 import org.jboss.test.cts.interfaces.CtsCmp;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Tests of accessing the UserTransaction interface.
  *
@@ -71,6 +74,22 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(NestedUserTransactionTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(NestedUserTransactionTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionLocalUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionLocalUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionLocalUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,10 +25,13 @@
 import javax.naming.InitialContext;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.StatelessSession;
 import org.jboss.test.cts.interfaces.StatelessSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Tests of stateful session beans
  *
@@ -66,6 +69,22 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(StatefulSessionLocalUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(StatefulSessionLocalUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -44,9 +44,12 @@
 import org.jboss.test.cts.interfaces.BeanContextInfo;
 import org.jboss.test.cts.interfaces.StrictlyPooledSessionHome;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import EDU.oswego.cs.dl.util.concurrent.CountDown;
 
@@ -787,7 +790,23 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(StatefulSessionUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(StatefulSessionUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionBrokenCreateUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionBrokenCreateUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionBrokenCreateUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -28,10 +28,13 @@
 import javax.rmi.PortableRemoteObject;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.StatelessSession;
 import org.jboss.test.cts.interfaces.StatelessSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  *  Simple test to assert the correct exception when
@@ -73,6 +76,21 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(StatelessSessionBrokenCreateUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(StatelessSessionBrokenCreateUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -22,17 +22,18 @@
 package org.jboss.test.cts.test;
 
 
-import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
+
 import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
-import org.jboss.test.cts.interfaces.ClientCallback;
-import org.jboss.test.cts.interfaces.StatelessSession;
-import org.jboss.test.cts.interfaces.StatelessSessionHome;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.cts.interfaces.StatelessSession;
+import org.jboss.test.cts.interfaces.StatelessSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Class StatelessSessionStressTestCase
@@ -107,7 +108,23 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(StatelessSessionStressTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(StatelessSessionStressTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -34,12 +34,16 @@
 import javax.ejb.CreateException;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.StatelessSession;
 import org.jboss.test.cts.interfaces.StatelessSessionHome;
 import org.jboss.test.cts.interfaces.StrictlyPooledSessionHome;
 import org.jboss.test.cts.interfaces.StrictlyPooledSession;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
+
 import EDU.oswego.cs.dl.util.concurrent.CountDown;
 
 /** Basic conformance tests for stateless sessions
@@ -265,7 +269,24 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(StatelessSessionUnitTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(StatelessSessionUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/UserTransactionLookupTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/UserTransactionLookupTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/cts/test/UserTransactionLookupTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -27,11 +27,14 @@
 import javax.transaction.UserTransaction;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.cts.interfaces.CtsCmpHome;
 import org.jboss.test.cts.interfaces.CtsCmp;
 import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Tests of accessing the UserTransaction interface.
  *
@@ -110,7 +113,23 @@
 
 	public static Test suite() throws Exception
    {
-		return getDeploySetup(UserTransactionLookupTestCase.class, "cts.jar");
+      return new JBossTestSetup(new TestSuite(UserTransactionLookupTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("cts.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("cts.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+		
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ee5client/unit/AppClientUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ee5client/unit/AppClientUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ee5client/unit/AppClientUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -28,10 +28,14 @@
 import javax.naming.Context;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.JBossJMSTestCase;
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.ee5client.client.HelloWorldClient;
+import org.jboss.test.jbossmessaging.ra.RaJMSSessionUnitTestCase;
 
 /**
  * A basic EE5 application client test case
@@ -40,7 +44,7 @@
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class AppClientUnitTestCase extends JBossTestCase
+public class AppClientUnitTestCase extends JBossJMSTestCase
 {
    public AppClientUnitTestCase(String name)
    {
@@ -85,8 +89,26 @@
       env.setProperty("j2ee.clientName", applicationClientName);
       return env;
    }
+   
    public static Test suite() throws Exception
    {
-      return getDeploySetup(AppClientUnitTestCase.class, "ee5client-jms-service.xml,ee5client-test.ear");
+      TestSuite suite = new TestSuite();
+      
+      suite.addTest(new JBossTestSetup(new TestSuite(AppClientUnitTestCase.class))
+      {
+          protected void setUp() throws Exception
+          {
+             super.setUp();
+             AppClientUnitTestCase.deployQueue("messageReplier");
+             deploy ("ee5client-test.ear");
+          }
+          protected void tearDown() throws Exception
+          {
+             undeploy ("ee5client-test.ear");
+             RaJMSSessionUnitTestCase.undeployDestinations();
+          }
+      });
+
+      return suite;
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/AbstractLifeCycleTestWrapper.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/AbstractLifeCycleTestWrapper.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/AbstractLifeCycleTestWrapper.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -40,6 +40,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.system.ServiceControllerMBean;
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Base TestCase for lifecycle tests. This test overrides the run method of the JUnit test
@@ -162,6 +163,7 @@
       super.setUp();
       try
       {
+         JMSDestinationsUtil.setupBasicDestinations();
          redeploy(getPackage());
       }
       catch(Exception e)
@@ -179,6 +181,7 @@
    protected void undeploy() throws Exception
    {
       undeploy(getPackage());
+      JMSDestinationsUtil.destroyDestinations();
    }
 
    /**

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/InvokersLifeCycleUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/InvokersLifeCycleUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb/lifecycle/test/InvokersLifeCycleUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -84,18 +84,19 @@
       String poolJMXName = Container.BASE_EJB_CONTAINER_NAME + ",jndiName=" +  mdbName + ",plugin=pool";
       restart(poolJMXName);
    }
+
+//   TODO: remove the test after merge as it doesn't make sense
+//   public void testRestartQueues() throws Exception
+//   {
+//      String[] queues = new String[] {
+//            "jboss.mq.destination:service=Queue,name=A",
+//            "jboss.mq.destination:service=Queue,name=B",
+//            "jboss.mq.destination:service=Queue,name=C",
+//            "jboss.mq.destination:service=Queue,name=D",
+//            "jboss.mq.destination:service=Queue,name=ex" };
+//      restart(queues);
+//   }
    
-   public void testRestartQueues() throws Exception
-   {
-      String[] queues = new String[] {
-            "jboss.mq.destination:service=Queue,name=A",
-            "jboss.mq.destination:service=Queue,name=B",
-            "jboss.mq.destination:service=Queue,name=C",
-            "jboss.mq.destination:service=Queue,name=D",
-            "jboss.mq.destination:service=Queue,name=ex" };
-      restart(queues);
-   }
-   
    public void testRestartBMPContainer() throws Exception
    {
       restart(simpleBMPName);

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb3/jbas6239/QueueTestMDB.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb3/jbas6239/QueueTestMDB.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/ejb3/jbas6239/QueueTestMDB.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -51,7 +51,7 @@
 })
 @RunAs("TestRole")
 @SecurityDomain(value="other",unauthenticatedPrincipal="user")
- at Depends("jboss.mq.destination:name=mdbtest,service=Queue")
+ at Depends("org.hornetq:module=JMS,name=\"mdbtest\",type=Queue")
 public class QueueTestMDB implements MessageListener
 {
    @Resource(mappedName="java:/ConnectionFactory")

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/invokers/test/MultiInvokersUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/invokers/test/MultiInvokersUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/invokers/test/MultiInvokersUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,14 +25,19 @@
 import javax.naming.InitialContext;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.jboss.proxy.IClientContainer;
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.cts.test.BmpUnitTestCase;
 import org.jboss.test.invokers.interfaces.SimpleBMP;
 import org.jboss.test.invokers.interfaces.SimpleBMPHome;
 import org.jboss.test.invokers.interfaces.StatelessSession;
 import org.jboss.test.invokers.interfaces.StatelessSessionHome;
 import org.jboss.test.invokers.interfaces.BusinessObjectHome;
 import org.jboss.test.invokers.interfaces.BusinessObject;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Test use of multiple invokers per container
@@ -129,7 +134,24 @@
 
    public static Test suite() throws Exception
    {
-      return getDeploySetup(MultiInvokersUnitTestCase.class, "invokers.jar");
+      return new JBossTestSetup(new TestSuite(MultiInvokersUnitTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("invokers.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("invokers.jar");
+            JMSDestinationsUtil.destroyDestinations();
+            super.tearDown();
+         }
+      };
+
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jacc/test/WebIntegrationUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jacc/test/WebIntegrationUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jacc/test/WebIntegrationUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -75,32 +75,12 @@
          { 
             super.setUp(); 
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
             redeploy("jbosstest-web.ear"); 
             flushAuthCache("jbosstest-web"); 
          } 
          protected void tearDown() throws Exception 
          { 
             undeploy("jbosstest-web.ear");
-
-            try
-            {
-               // Remove all the messages created during this test
-               getServer().invoke
-               (
-                  new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                  "removeAllMessages",
-                  new Object[0],
-                  new String[0]
-               );
-            }
-            catch(Exception e)
-            {
-            }
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            undeploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
             super.tearDown();
          } 
       }; 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -47,8 +47,8 @@
 import javax.naming.Context;
 import javax.naming.NamingException;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
 import org.jboss.logging.Logger;
+import org.jboss.test.JBossJMSTestCase;
 
 /**
  * JMS tests base class.
@@ -66,7 +66,7 @@
  * @author    <a href="pra at tim.se">Peter Antman</a>
  * @version $Revision$
  */
-public class JMSBase extends JMSTestCase
+public class JMSBase extends JBossJMSTestCase
 {
    public static final int PUBLISHER = 0;
    public static final int SUBSCRIBER = 1;
@@ -665,7 +665,24 @@
          super(type, transacted, creator, number);
       }
 
+      public TopicWorker(int type,
+         int transacted,
+         MessageCreator creator,
+         int number,
+         String factoryName
+         ) throws Exception
+      {
+         super(type, transacted, creator, number);
+         topicFactory = (TopicConnectionFactory) context.lookup(factoryName);
+      }
 
+      public TopicWorker(int type, int transacted, MessageFilter filter, String factoryName) throws Exception
+      {
+         super(type, transacted, filter);
+         topicFactory = (TopicConnectionFactory) context.lookup(factoryName);
+      }
+
+
       public void publish() throws JMSException
       {
          publish(number);

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,11 +21,14 @@
  */
 package org.jboss.test.jbossmessaging.perf;
 
+import java.util.concurrent.CountDownLatch;
+
 import javax.jms.BytesMessage;
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
 import javax.jms.QueueReceiver;
@@ -38,13 +41,11 @@
 import javax.jms.TopicPublisher;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
-import javax.jms.Queue;
 import javax.naming.Context;
 
-import junit.framework.Test;
-
 import org.jboss.logging.Logger;
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 /**
  * JMSPerfStressTestCase.java Some simple tests of JMS provider
  *
@@ -53,7 +54,7 @@
  * @version
  */
 
-public class JMSPerfStressTestCase extends JMSTestCase
+public class JMSPerfStressTestCase extends JBossJMSTestCase
 {
 
    // Provider specific
@@ -241,6 +242,8 @@
 
       final int iterationCount = getIterationCount();
       final Logger log = getLog();
+      
+      final CountDownLatch startFlag = new CountDownLatch(1);
 
       Thread sendThread =
          new Thread()
@@ -258,7 +261,7 @@
 
                   TopicPublisher publisher = session.createPublisher(topic);
 
-                  waitForSynchMessage();
+                  startFlag.await();
 
                   BytesMessage message = session.createBytesMessage();
                   message.writeBytes(PERFORMANCE_TEST_DATA_PAYLOAD);
@@ -345,7 +348,7 @@
       long startTime = System.currentTimeMillis();
       sendThread.start();
       subscriber.setMessageListener(listener);
-      sendSynchMessage();
+      startFlag.countDown();
       synchronized (listener)
       {
          topicConnection.start();
@@ -507,9 +510,12 @@
       }
       final int iterationCount = getIterationCount();
       final Logger log = getLog();
+      
+      final CountDownLatch alignFlag = new CountDownLatch(2);
+      
 
       Thread sendThread =
-         new Thread()
+         new Thread("sendThread transacted = " + transacted + " persistent = " + persistence)
          {
             /**
              * Main processing method for the JBossMQPerfStressTestCase object
@@ -524,7 +530,8 @@
 
                   TopicPublisher publisher = session.createPublisher(topic);
 
-                  waitForSynchMessage();
+                  alignFlag.countDown();
+                  alignFlag.await();
 
                   BytesMessage message = session.createBytesMessage();
                   message.writeBytes(PERFORMANCE_TEST_DATA_PAYLOAD);
@@ -561,7 +568,7 @@
          };
 
       Thread recvThread =
-         new Thread()
+         new Thread("recvThread transacted = " + transacted + " persistent = " + persistence)
          {
             /**
              * Main processing method for the JBossMQPerfStressTestCase object
@@ -575,7 +582,8 @@
                   Topic topic = (Topic)context.lookup(TEST_TOPIC);
                   TopicSubscriber subscriber = session.createSubscriber(topic);
 
-                  sendSynchMessage();
+                  alignFlag.countDown();
+                  alignFlag.await();
 
                   long startTime = System.currentTimeMillis();
                   for (int i = 0; i < iterationCount; i++)
@@ -622,7 +630,7 @@
       getLog().debug("  All threads finished after: " + ((double)pTime / 1000) + " seconds. ");
 
    }
-
+   
    /**
     * A unit test for JUnit
     *
@@ -703,6 +711,14 @@
       getLog().debug("SynchTopicPerformance passed");
    }
 
+//   public static TestSuite suite() throws Exception
+//   {
+//      TestSuite suite = new TestSuite();
+//      suite.addTest(new JMSPerfStressTestCase("testSynchTopicPerformance"));
+//      return suite;
+//   }
+
+
    /**
     * The JUnit setup method
     *
@@ -712,6 +728,7 @@
    {
 	   // perform any setUp() required by the base class
 	   super.setUp() ;
+      JMSDestinationsUtil.setupBasicDestinations();
 
 	   if (context == null)
 	   {
@@ -738,6 +755,8 @@
    {
 	   try {queueConnection.close();} catch (Throwable ignored){}
 	   try {topicConnection.close();} catch (Throwable ignored){}
+	   
+	   JMSDestinationsUtil.destroyDestinations();
    }
 
 
@@ -766,34 +785,5 @@
 
    }
 
-   private void waitForSynchMessage() throws Exception
-   {
-      QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-      Queue queue = (Queue)context.lookup(TEST_QUEUE);
 
-      QueueReceiver receiver = session.createReceiver(queue);
-      receiver.receive();
-      session.close();
-   }
-
-   private void sendSynchMessage() throws Exception
-   {
-      QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-      Queue queue = (Queue)context.lookup(TEST_QUEUE);
-
-      QueueSender sender = session.createSender(queue);
-
-      Message message = session.createMessage();
-      sender.send(message);
-
-      session.close();
-   }
-
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(JMSPerfStressTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSReconnectStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSReconnectStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSReconnectStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,7 +25,7 @@
 import javax.jms.QueueConnectionFactory;
 import javax.naming.InitialContext;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 
 /**
  * Reconnect stress
@@ -35,7 +35,7 @@
  * @version
  */
 
-public class JMSReconnectStressTestCase extends JMSTestCase
+public class JMSReconnectStressTestCase extends JBossJMSTestCase
 {
    static String QUEUE_FACTORY = "ConnectionFactory";
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/ReceiveNackClientStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/ReceiveNackClientStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/ReceiveNackClientStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -34,12 +34,9 @@
 import javax.jms.QueueSender;
 import javax.jms.QueueSession;
 import javax.jms.Session;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
 import javax.naming.InitialContext;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
-import org.jboss.util.NestedRuntimeException;
+import org.jboss.test.JBossJMSTestCase;
 
 /**
  * A stress test for an impatient receiver
@@ -48,8 +45,10 @@
  * @author    <a href="mailto:adrian at jboss.com">Adrian Brock</a>
  * @version   $Revision$
  */
-public class ReceiveNackClientStressTestCase extends JMSTestCase implements ExceptionListener
+public class ReceiveNackClientStressTestCase extends JBossJMSTestCase implements ExceptionListener
 {
+   private static final String IMPATIENT = "/queue/Impatient";
+
    protected QueueConnection queueConnection;
    
    public ReceiveNackClientStressTestCase(String name) throws Exception
@@ -68,31 +67,32 @@
       {
       }
    }
-   
-    private void drainQueue(String name) throws Exception
-    {
-	InitialContext context = getInitialContext() ;
 
-	QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-	Queue queue = (Queue)context.lookup(name);
+   private void drainQueue(String name) throws Exception
+   {
+      InitialContext context = getInitialContext();
 
-	QueueReceiver receiver = session.createReceiver(queue);
-	queueConnection.start();
-	Message message = receiver.receive(50);
-	int c = 0;
-	while (message != null)
-	    {
-		message = receiver.receive(50);
-		c++;
-	    }
+      QueueSession session = queueConnection.createQueueSession(false,
+            Session.AUTO_ACKNOWLEDGE);
+      Queue queue = (Queue) context.lookup(name);
 
-	if (c != 0)
-	    getLog().debug("  Drained " + c + " messages from the queue");
-	session.close();
-	queueConnection.stop();
+      QueueReceiver receiver = session.createReceiver(queue);
+      queueConnection.start();
+      Message message = receiver.receive(50);
+      int c = 0;
+      while (message != null)
+      {
+         message = receiver.receive(50);
+         c++;
+      }
 
-    }
+      if (c != 0)
+         getLog().debug("  Drained " + c + " messages from the queue");
+      session.close();
+      queueConnection.stop();
 
+   }
+
    public void testImpatient() throws Exception
    {
       int target = getIterationCount();
@@ -100,13 +100,15 @@
       try
       {
          InitialContext context = getInitialContext();
-         QueueConnectionFactory queueFactory = (QueueConnectionFactory) context.lookup("ConnectionFactory");
-         Queue queue = (Queue) context.lookup("Impatient");
+         QueueConnectionFactory queueFactory = (QueueConnectionFactory) context
+               .lookup("ConnectionFactory");
+         Queue queue = (Queue) context.lookup(IMPATIENT);
          queueConnection = queueFactory.createQueueConnection();
-         drainQueue("Impatient") ;
+         drainQueue(IMPATIENT);
          try
          {
-            QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+            QueueSession session = queueConnection.createQueueSession(false,
+                  Session.AUTO_ACKNOWLEDGE);
             QueueSender sender = session.createSender(queue);
             QueueReceiver receiver = session.createReceiver(queue);
             Serializable payload = new HashMap();
@@ -127,13 +129,13 @@
          }
          finally
          {
-            drainQueue("Impatient") ;
+            drainQueue(IMPATIENT);
             queueConnection.close();
          }
       }
       finally
       {
-         deleteQueue("Impatient");
+         undeployDestinations();
       }
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -23,8 +23,10 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
+
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
 import javax.jms.QueueReceiver;
@@ -38,13 +40,11 @@
 import javax.jms.TopicPublisher;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
-import javax.jms.Queue;
 import javax.naming.Context;
 
-import junit.framework.Test;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
-
 /**
  * SendReplyPerfStressTestCase.java
  * Some send/reply performance tests
@@ -53,7 +53,7 @@
  * @author
  * @version
  */
-public class SendReplyPerfStressTestCase extends JMSTestCase
+public class SendReplyPerfStressTestCase extends JBossJMSTestCase
 {
    // Provider specific
    static String TOPIC_FACTORY = "ConnectionFactory";
@@ -98,6 +98,10 @@
       public synchronized void addError(Throwable t)
       {
          errors.add(t);
+         synchronized (System.out)
+         {
+            t.printStackTrace(System.out);
+         }
       }
       public synchronized void finished()
       {
@@ -136,7 +140,10 @@
             sender.send(message);
 
             QueueReceiver receiver = session.createReceiver(temp);
-            receiver.receive();
+            if (receiver.receive(2000) == null)
+            {
+               state.addError(new Exception("Didn't receive message"));
+            }
             receiver.close();
             temp.delete();
             
@@ -178,7 +185,10 @@
             publisher.publish(message);
 
             QueueReceiver receiver = qsession.createReceiver(temp);
-            receiver.receive();
+            if (receiver.receive(2000) == null)
+            {
+               state.addError(new Exception("Didn't receive message"));
+            }
             receiver.close();
             
             session.close();
@@ -207,8 +217,9 @@
          try
          {
             QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            Queue replyQueue = session.createQueue(((Queue)message.getJMSReplyTo()).getQueueName());
+            Queue replyQueue = (Queue)message.getJMSReplyTo();
             QueueSender sender = session.createSender(replyQueue);
+            System.out.println("Sending response");
             sender.send(message);
             sender.close();
             session.close();
@@ -289,6 +300,8 @@
    {
        // call setUp() of superclass
        super.setUp() ;
+       
+       JMSDestinationsUtil.setupBasicDestinations();
 
       getLog().info("Starting test: " + getName());
 
@@ -308,6 +321,8 @@
       getLog().info("Ended test: " + getName());
       queueConnection.close();
       topicConnection.close();
+      
+      undeployDestinations();
 
       // call tearDown() of superclass
       super.tearDown() ;
@@ -335,12 +350,5 @@
 
    }
    
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(SendReplyPerfStressTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-   
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaJMSSessionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,18 +21,15 @@
  */
 package org.jboss.test.jbossmessaging.ra;
 
-import javax.jms.*;
-import javax.naming.InitialContext;
-
-import org.jboss.test.jbossmessaging.JMSTestCase;
-import org.jboss.test.JBossTestSetup;
-import org.jboss.test.client.test.AppClientUnitTestCase;
-
-import org.jboss.test.jmsra.bean.*;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.jmsra.bean.JMSSession;
+import org.jboss.test.jmsra.bean.JMSSessionHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
+
 /**
  * Test for jmsra.
  *
@@ -41,7 +38,7 @@
  * @version $Revision$
  */
 
-public class RaJMSSessionUnitTestCase extends JMSTestCase
+public class RaJMSSessionUnitTestCase extends JBossJMSTestCase
 {
    public RaJMSSessionUnitTestCase(String name)
    {
@@ -66,14 +63,14 @@
           {
              super.setUp();
              ClassLoader loader = Thread.currentThread().getContextClassLoader();
-             deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+             JMSDestinationsUtil.setupBasicDestinations();
              deploy ("jmsra.jar");
           }
           protected void tearDown() throws Exception
           {
              ClassLoader loader = Thread.currentThread().getContextClassLoader();
              undeploy ("jmsra.jar");
-             undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+             JMSDestinationsUtil.destroyDestinations();
           }
       });
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaQueueUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,21 +21,18 @@
  */
 package org.jboss.test.jbossmessaging.ra;
 
-import javax.jms.MessageConsumer;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
-
 import javax.jms.QueueConnectionFactory;
 import javax.jms.QueueSession;
 import javax.jms.Session;
-
-import javax.management.ObjectName;
-
 import javax.naming.Context;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 
 /**
@@ -87,29 +84,20 @@
 
    public static Test suite() throws Exception
    {
-	      return new JBossTestSetup(getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar"))
+	      return new JBossTestSetup(new TestSuite(RaQueueUnitTestCase.class))
 	         {
 	            protected void setUp() throws Exception
 	            {
 	               super.setUp();
-	               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-	               deploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	               JMSDestinationsUtil.setupBasicDestinations();
+	               deploy("jmsra.jar");
 	            }
 
 	             protected void tearDown() throws Exception
 	             {
-	                super.tearDown();
-
-	                // Remove the messages
-	                getServer().invoke
-	                (
-	                   new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
-	                   "removeAllMessages",
-	                   new Object[0],
-	                   new String[0]
-	                );
-	                ClassLoader loader = Thread.currentThread().getContextClassLoader();
-	                undeploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+	                undeploy("jmsra.jar");
+	                JMSDestinationsUtil.destroyDestinations();
+                   super.tearDown();
 	             }
 	          };
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaSyncRecUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,29 +21,26 @@
  */
 package org.jboss.test.jbossmessaging.ra;
 
-import javax.jms.Connection;
-import javax.jms.Message;
-
+import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
 import javax.jms.QueueSender;
 import javax.jms.QueueSession;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.jms.Queue;
 import javax.naming.Context;
 
-import javax.management.ObjectName;
-
 import junit.framework.Assert;
-
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossTestCase;
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.jmsra.bean.Publisher;
+import org.jboss.test.jmsra.bean.QueueRec;
+import org.jboss.test.jmsra.bean.QueueRecHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
-import org.jboss.test.jmsra.bean.*;
-
 /**
  * 
  * <p>Test sync receive.
@@ -55,7 +52,7 @@
  * @version $Revision$
  */
 
-public class RaSyncRecUnitTestCase extends JMSTestCase {
+public class RaSyncRecUnitTestCase extends JBossTestCase {
 
    private final static String BEAN_JNDI = "QueueRec";
    private final static String QUEUE_FACTORY = "ConnectionFactory";
@@ -77,35 +74,39 @@
 
    /**
     * Receiving bean
-    */ 
+    */
    protected QueueRec rec;
 
    /**
-    *   
+    * 
     * Constructor for the RaSyncRecUnitTestCase object
-    *
-    * @param name           Description of Parameter
-    * @exception Exception  Description of Exception
+    * 
+    * @param name
+    *           Description of Parameter
+    * @exception Exception
+    *               Description of Exception
     */
-   public RaSyncRecUnitTestCase(String name) {
+   public RaSyncRecUnitTestCase(String name)
+   {
       super(name);
    }
-   
+
    /**
     * The JUnit setup method
-    *
-    * @exception Exception  Description of Exception
+    * 
+    * @exception Exception
+    *               Description of Exception
     */
    protected void setUp() throws Exception
    {
-       // call setUp() in super class
-       super.setUp() ;
+      // call setUp() in super class
+      super.setUp();
 
       // Create a receiver
       Context context = getInitialContext();
       try
       {
-         QueueRecHome home = (QueueRecHome)context.lookup(BEAN_JNDI);
+         QueueRecHome home = (QueueRecHome) context.lookup(BEAN_JNDI);
          rec = home.create();
 
          init(context);
@@ -122,28 +123,30 @@
 
    /**
     * #Description of the Method
-    *
-    * @param context        Description of Parameter
-    * @exception Exception  Description of Exception
+    * 
+    * @param context
+    *           Description of Parameter
+    * @exception Exception
+    *               Description of Exception
     */
    protected void init(final Context context) throws Exception
    {
-      QueueConnectionFactory factory =
-	 (QueueConnectionFactory)context.lookup(QUEUE_FACTORY);
-      
+      QueueConnectionFactory factory = (QueueConnectionFactory) context.lookup(QUEUE_FACTORY);
+
       connection = factory.createQueueConnection();
-      
-      session = ((QueueConnection)connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-      
-      Queue queue = (Queue)context.lookup(QUEUE);
-      
-      sender = ((QueueSession)session).createSender(queue);
+
+      session = ((QueueConnection) connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+
+      Queue queue = (Queue) context.lookup(QUEUE);
+
+      sender = ((QueueSession) session).createSender(queue);
    }
 
    /**
     * The teardown method for JUnit
-    *
-    * @exception Exception  Description of Exception
+    * 
+    * @exception Exception
+    *               Description of Exception
     */
    protected void tearDown() throws Exception
    {
@@ -151,8 +154,9 @@
       {
          sender.close();
       }
-      if (session != null) { 
-	 session.close();
+      if (session != null)
+      {
+         session.close();
       }
       if (connection != null)
       {
@@ -160,13 +164,14 @@
       }
 
       // call tearDown() in superclass
-      super.tearDown() ;
+      super.tearDown();
    }
 
    /**
     * Test sync receive of message with jms ra.
     */
-   public void testSyncRec() throws Exception {
+   public void testSyncRec() throws Exception
+   {
       // Send a message to queue
       TextMessage message = session.createTextMessage();
       message.setText(String.valueOf(MESSAGE_NR));
@@ -182,36 +187,23 @@
 
    public static Test suite() throws Exception
    {
-      return new JBossTestSetup(getDeploySetup(RaSyncRecUnitTestCase.class, "jmsra.jar"))
+      return new JBossTestSetup(new TestSuite(RaSyncRecUnitTestCase.class))
       {
          protected void setUp() throws Exception
          {
             super.setUp();
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy (loader.getResource("jbossmessaging/test-destinations-full-service.xml").toString());
+            deploy("jmsra.jar");
+            JMSDestinationsUtil.setupBasicDestinations();
          }
 
-          protected void tearDown() throws Exception
-          {
-             super.tearDown();
+         protected void tearDown() throws Exception
+         {
+            super.tearDown();
+            JMSDestinationsUtil.destroyDestinations();
+            deploy("jmsra.jar");
+         }
+      };
 
-             // Remove the messages
-             getServer().invoke
-             (
-                new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
-                "removeAllMessages",
-                new Object[0],
-                new String[0]
-             );
-             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-             undeploy (loader.getResource("jbossmessaging/test-destinations-full-service.xml").toString());
-          }
-       };
-      
    }
 } // RaSyncRecUnitTestCase
 
-
-
-
-

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -33,7 +33,7 @@
 
 import junit.framework.TestCase;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 
 import org.jboss.test.jmsra.bean.*;
 
@@ -47,7 +47,7 @@
  * @author    <a href="mailto:jason at planet57.com">Jason Dillon</a>
  * @version   $Revision$
  */
-public abstract class RaTest extends JMSTestCase
+public abstract class RaTest extends JBossJMSTestCase
 {
    /**
     * Description of the Field

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/ra/RaTopicUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -36,6 +36,7 @@
 import junit.framework.Test;
 
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 
 /**
@@ -56,9 +57,11 @@
 
    /**
     * Constructor for the RaTopicUnitTestCase object
-    *
-    * @param name           Description of Parameter
-    * @exception Exception  Description of Exception
+    * 
+    * @param name
+    *           Description of Parameter
+    * @exception Exception
+    *               Description of Exception
     */
    public RaTopicUnitTestCase(String name) throws Exception
    {
@@ -67,52 +70,41 @@
 
    /**
     * #Description of the Method
-    *
-    * @param context        Description of Parameter
-    * @exception Exception  Description of Exception
+    * 
+    * @param context
+    *           Description of Parameter
+    * @exception Exception
+    *               Description of Exception
     */
    protected void init(final Context context) throws Exception
    {
-      TopicConnectionFactory factory =
-            (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
+      TopicConnectionFactory factory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
 
       connection = factory.createTopicConnection();
 
-      session = ((TopicConnection)connection).createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+      session = ((TopicConnection) connection).createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
 
-      Topic topic = (Topic)context.lookup(TOPIC);
+      Topic topic = (Topic) context.lookup(TOPIC);
 
-      consumer = ((TopicSession)session).createSubscriber(topic);
+      consumer = ((TopicSession) session).createSubscriber(topic);
    }
 
    public static Test suite() throws Exception
    {
-	      return new JBossTestSetup(getDeploySetup(RaTopicUnitTestCase.class, "jmsra.jar"))
-	         {
-	            protected void setUp() throws Exception
-	            {
-	               super.setUp();
-	               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-	               deploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-	            }
+      return new JBossTestSetup(getDeploySetup(RaTopicUnitTestCase.class, "jmsra.jar"))
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+         }
 
-	             protected void tearDown() throws Exception
-	             {
-	                super.tearDown();
-
-	                // Remove the messages
-	                getServer().invoke
-	                (
-	                   new ObjectName("jboss.messaging.destination:service=Queue,name=testQueue"),
-	                   "removeAllMessages",
-	                   new Object[0],
-	                   new String[0]
-	                );
-	                ClassLoader loader = Thread.currentThread().getContextClassLoader();
-	                undeploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-	             }
-	          };
+         protected void tearDown() throws Exception
+         {
+            super.tearDown();
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
    }
 
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConcurrentDeliveryUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConcurrentDeliveryUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConcurrentDeliveryUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -32,7 +32,7 @@
 import javax.jms.TemporaryQueue;
 import javax.naming.Context;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 
 /**
  * Concurrent delivery tests
@@ -41,7 +41,7 @@
  * @author <a href="mailto:adrian at jboss.org>Adrian Brock</a>
  * @version <tt>$Revision$</tt>
  */
-public class ConcurrentDeliveryUnitTestCase extends JMSTestCase
+public class ConcurrentDeliveryUnitTestCase extends JBossJMSTestCase
 {
    static String QUEUE_FACTORY = "ConnectionFactory";
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConnectionConsumerUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConnectionConsumerUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/ConnectionConsumerUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -35,7 +35,7 @@
 import javax.jms.TopicSession;
 import javax.naming.InitialContext;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 import org.jboss.test.jbossmessaging.MockServerSessionPool;
 
 /**
@@ -44,7 +44,7 @@
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class ConnectionConsumerUnitTestCase extends JMSTestCase
+public class ConnectionConsumerUnitTestCase extends JBossJMSTestCase
 {
    /**
     * Create a new ConnectionConsumerUnitTestCase.

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossJMSUnitTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -52,7 +52,8 @@
 import javax.naming.InitialContext;
 
 import org.jboss.logging.Logger;
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 import EDU.oswego.cs.dl.util.concurrent.CountDown;
 
@@ -62,7 +63,7 @@
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class JBossJMSUnitTest extends JMSTestCase
+public class JBossJMSUnitTest extends JBossJMSTestCase
 {
    /** The default TopicFactory jndi name */
    static String TOPIC_FACTORY = "ConnectionFactory";
@@ -82,6 +83,21 @@
    {
       super(name);
    }
+   
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      JMSDestinationsUtil.setupBasicDestinations();
+   }
+   
+   
+   protected void tearDown() throws Exception
+   {
+      super.tearDown();
+      disconnect();
+      JMSDestinationsUtil.destroyDestinations();
+   }
+   
 
    // Emptys out all the messages in a queue
    protected void drainQueue() throws Exception
@@ -137,12 +153,6 @@
 	      topicConnection = null;
 	  }
    }
-   
-   protected void tearDown() throws Exception
-   {
-	   super.tearDown();
-	   disconnect();
-   }
 
    /**
     * Test that messages are ordered by message arrival and priority.
@@ -1352,12 +1362,5 @@
          }
       }
    }
-   
-   public static junit.framework.Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(JBossJMSUnitTest.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JBossSessionRecoverUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -35,7 +35,8 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * JBossSessionRecoverUnitTestCase.java
@@ -46,7 +47,7 @@
  * @version $Revision$
  */
 
-public class JBossSessionRecoverUnitTestCase extends JMSTestCase
+public class JBossSessionRecoverUnitTestCase extends JBossJMSTestCase
 {
    String QUEUE_FACTORY = "ConnectionFactory";
    String TEST_QUEUE = "queue/testQueue";
@@ -67,6 +68,8 @@
    {
        // call setUp() in superclass
        super.setUp() ;
+       
+       JMSDestinationsUtil.setupBasicDestinations();
 
       this.getLog().debug("JBossSessionRecoverUnitTestCase, ConnectionFactory started");
    }
@@ -74,6 +77,8 @@
    protected void tearDown() throws Exception
    {
       this.getLog().debug("JBossSessionRecoverUnitTestCase, ConnectionFactory done");
+      
+      JMSDestinationsUtil.destroyDestinations();
 
       // call tearDown() in superclass
       super.tearDown() ;
@@ -551,12 +556,4 @@
       queueConnection.close();
       getLog().debug("session.recover() receiveNoWait passed");
    }
-
-   public static junit.framework.Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(JBossSessionRecoverUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/Jms11UnitTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/Jms11UnitTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/Jms11UnitTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -22,6 +22,7 @@
 package org.jboss.test.jbossmessaging.test;
 
 import java.util.Enumeration;
+
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.DeliveryMode;
@@ -46,11 +47,15 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
-import EDU.oswego.cs.dl.util.concurrent.CountDown;
+import junit.framework.TestSuite;
+
 import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.jbossmessaging.JMSTestCase;
-import org.jboss.test.jbossmessaging.perf.JMSPerfStressTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
+import EDU.oswego.cs.dl.util.concurrent.CountDown;
+
 /**
  * Basic tests using the jms 1.1 producer/consumer apis.
  *
@@ -60,9 +65,9 @@
 public class Jms11UnitTest extends JMSTestCase
 {
    /** The default TopicFactory jndi name */
-   static String TOPIC_FACTORY = "ConnectionFactory";
+   static String TOPIC_FACTORY = "/ConnectionFactory";
    /** The default QueueFactory jndi name */
-   static String QUEUE_FACTORY = "ConnectionFactory";
+   static String QUEUE_FACTORY = "/ConnectionFactory";
 
    static String TEST_QUEUE = "queue/testQueue";
    static String TEST_TOPIC = "topic/testTopic";
@@ -73,15 +78,6 @@
    static Connection queueConnection;
    static Connection topicConnection;
 
-   public static junit.framework.Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       String resourceName = getJMSResourceRelativePathname("test-destinations-full-service.xml") ;
-
-       return getDeploySetup(Jms11UnitTest.class,
-               loader.getResource(resourceName).toString());
-   }
-
    public Jms11UnitTest(String name) throws Exception
    {
       super(name);
@@ -89,44 +85,28 @@
 
    protected void tearDown() throws Exception
    {
-	   super.tearDown();
 	   disconnect();
-	   
+	   JMSDestinationsUtil.destroyDestinations();
+	   context.close();
+	   context = null;
+      super.tearDown();
    }
    
-   // Emptys out all the messages in a queue
-   protected void drainQueue() throws Exception
+   public void setUp() throws Exception
    {
-      Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      Queue queue = (Queue) context.lookup(TEST_QUEUE);
-
-      MessageConsumer receiver = session.createConsumer(queue);
-      Message message = receiver.receive(50);
-      int c = 0;
-      while (message != null)
-      {
-         message = receiver.receive(50);
-         c++;
-      }
-
-      if (c != 0)
-         getLog().debug("  Drained " + c + " messages from the queue");
-
-      session.close();
+      super.setUp();
+      JMSDestinationsUtil.setupBasicDestinations();
+      context = new InitialContext();
    }
-
+   
    protected void connect() throws Exception
    {
-      if (context == null)
-      {
-         context = new InitialContext();
-      }
       ConnectionFactory queueFactory = (ConnectionFactory) context.lookup(QUEUE_FACTORY);
       queueConnection = queueFactory.createConnection();
 
       ConnectionFactory topicFactory = (ConnectionFactory) context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createConnection();
-      getLog().debug("Connection to JBossMQ established.");
+
    }
 
    protected void disconnect() throws Exception
@@ -142,6 +122,7 @@
 	      topicConnection.close();
 	      topicConnection = null;
 	  }
+
    }
 
    /**
@@ -162,8 +143,6 @@
 
       queueConnection.start();
 
-      drainQueue();
-
       Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
       Queue queue = (Queue) context.lookup(TEST_QUEUE);
       MessageProducer sender = session.createProducer(queue);
@@ -174,7 +153,7 @@
       message.setText("Persistent message");
       sender.send(message, DeliveryMode.PERSISTENT, 4, 0);
       message.setText("High Priority Persistent message");
-      sender.send(message, DeliveryMode.PERSISTENT, 10, 0);
+      sender.send(message, DeliveryMode.PERSISTENT, 9, 0);
 
       QueueBrowser browser = session.createBrowser(queue);
       Enumeration i = browser.getEnumeration();
@@ -229,38 +208,6 @@
    }
 
    /**
-    * Test invalid destination trying to send a message.
-    */
-   public void testInvalidDestinationQueueSend() throws Exception
-   {
-
-      getLog().debug("Starting InvaidDestinationQueueSend test");
-      connect();
-
-      Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TemporaryQueue queue = session.createTemporaryQueue();
-      MessageProducer sender = session.createProducer(queue);
-      queue.delete();
-
-      TextMessage message = session.createTextMessage("hello");
-      boolean caught = false;
-      try
-      {
-         sender.send(message);
-      }
-      catch (InvalidDestinationException expected)
-      {
-         caught = true;
-      }
-
-      disconnect();
-
-      assertTrue("Expected an InvalidDestinationException", caught);
-
-      getLog().debug("InvaldDestinationQueueSend passed");
-   }
-
-   /**
     * Test invalid destination trying to browse a message.
     */
    public void testInvalidDestinationQueueBrowse() throws Exception
@@ -292,38 +239,6 @@
    }
 
    /**
-    * Test invalid destination trying to send a message.
-    */
-   public void testInvalidDestinationTopicPublish() throws Exception
-   {
-
-      getLog().debug("Starting InvaidDestinationTopicPublish test");
-      connect();
-
-      Session session = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TemporaryTopic topic = session.createTemporaryTopic();
-      MessageProducer publisher = session.createProducer(topic);
-      topic.delete();
-
-      TextMessage message = session.createTextMessage("hello");
-      boolean caught = false;
-      try
-      {
-         publisher.send(message);
-      }
-      catch (InvalidDestinationException expected)
-      {
-         caught = true;
-      }
-
-      disconnect();
-
-      assertTrue("Expected an InvalidDestinationException", caught);
-
-      getLog().debug("InvaldDestinationTopicPublish passed");
-   }
-
-   /**
     * Test errors trying on topic subscribe.
     */
    public void testErrorsTopicSubscribe() throws Exception
@@ -376,7 +291,7 @@
          {
             session.createDurableSubscriber(temp, "NotUsed");
          }
-         catch (InvalidDestinationException expected)
+         catch (JMSException expected)
          {
             caught = true;
          }
@@ -387,7 +302,7 @@
          {
             session.createDurableSubscriber(null, "NotUsed", null, true);
          }
-         catch (InvalidDestinationException expected)
+         catch (JMSException expected)
          {
             caught = true;
          }
@@ -398,37 +313,37 @@
          {
             session.createDurableSubscriber(temp, "NotUsed", null, true);
          }
-         catch (InvalidDestinationException expected)
+         catch (JMSException expected)
          {
             caught = true;
          }
          assertTrue("Expected an InvalidDestinationException for a temporary topic", caught);
 
-         caught = false;
-         try
-         {
-            session.createDurableSubscriber(topic, null);
-         }
-         catch (Exception expected)
-         {
-            caught = true;
-         }
-         assertTrue("Expected a Exception for a null subscription", caught);
+//         caught = false;
+//         try
+//         {
+//            session.createDurableSubscriber(topic, null);
+//         }
+//         catch (Exception expected)
+//         {
+//            caught = true;
+//         }
+//         assertTrue("Expected a Exception for a null subscription", caught);
+//
+//         caught = false;
+//         try
+//         {
+//            session.createDurableSubscriber(topic, null, null, false);
+//         }
+//         catch (Exception expected)
+//         {
+//            caught = true;
+//         }
+//         assertTrue("Expected a Exception for a null subscription", caught);
 
          caught = false;
          try
          {
-            session.createDurableSubscriber(topic, null, null, false);
-         }
-         catch (Exception expected)
-         {
-            caught = true;
-         }
-         assertTrue("Expected a Exception for a null subscription", caught);
-
-         caught = false;
-         try
-         {
             session.createDurableSubscriber(topic, "  ");
          }
          catch (Exception expected)
@@ -466,8 +381,8 @@
       connect();
 
       Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-      Queue jndiQueue = (Queue) getInitialContext().lookup("queue/testQueue");
+      
+      Queue jndiQueue = (Queue) context.lookup("/queue/testQueue");
       Queue createQueue = session.createQueue(jndiQueue.getQueueName());
       assertTrue("Failed for " + QUEUE_FACTORY, jndiQueue.equals(createQueue));
 
@@ -480,7 +395,6 @@
 
       connect();
       queueConnection.start();
-      drainQueue();
       final CountDown counter1 = new CountDown(3);
 
       Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -517,8 +431,8 @@
       sender.send(message, DeliveryMode.PERSISTENT, 4, 0);
       //sender.send(queue, message, DeliveryMode.PERSISTENT, 4, 0);
       message.setText("High Priority Persistent message");
-      sender.send(message, DeliveryMode.PERSISTENT, 10, 0);
-      //sender.send(queue, message, DeliveryMode.PERSISTENT, 10, 0);
+      sender.send(message, DeliveryMode.PERSISTENT, 9, 0);
+      //sender.send(queue, message, DeliveryMode.PERSISTENT, 9, 0);
 
       // Wait for the msgs to be received
       counter1.acquire();
@@ -549,8 +463,8 @@
       sender.send(message, DeliveryMode.PERSISTENT, 4, 0);
       //sender.send(queue, message, DeliveryMode.PERSISTENT, 4, 0);
       message.setText("High Priority Persistent message");
-      sender.send(message, DeliveryMode.PERSISTENT, 10, 0);
-      //sender.send(queue, message, DeliveryMode.PERSISTENT, 10, 0);
+      sender.send(message, DeliveryMode.PERSISTENT, 9, 0);
+      //sender.send(queue, message, DeliveryMode.PERSISTENT, 9, 0);
 
       // Wait for the msgs to be received
       counter2.acquire();
@@ -562,11 +476,10 @@
       sender.send(message, DeliveryMode.PERSISTENT, 4, 0);
       //sender.send(queue, message, DeliveryMode.PERSISTENT, 4, 0);
       message.setText("High Priority Persistent message");
-      sender.send(message, DeliveryMode.PERSISTENT, 10, 0);
-      //sender.send(queue, message, DeliveryMode.PERSISTENT, 10, 0);
+      sender.send(message, DeliveryMode.PERSISTENT, 9, 0);
+      //sender.send(queue, message, DeliveryMode.PERSISTENT, 9, 0);
 
       sender.close();
-      drainQueue();
       disconnect();
       getLog().debug("MessageListener test passed");
    }
@@ -619,7 +532,7 @@
                }
             };
          }
-      }, 10);
+      }, 9);
 
       queueConnection.start();
 
@@ -656,6 +569,8 @@
 
       TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createTopicConnection("john", "needle");
+      
+      topicConnection.setClientID("john_id");
 
       topicConnection.start();
 
@@ -848,6 +763,9 @@
       getLog().debug("Create topic connection");
       TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createTopicConnection("john", "needle");
+      
+      topicConnection.setClientID("john_id");
+
       topicConnection.start();
 
       try
@@ -958,6 +876,9 @@
       getLog().debug("Create topic connection");
       TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createTopicConnection("john", "needle");
+      
+      topicConnection.setClientID("john_id");
+
       topicConnection.start();
 
       try
@@ -994,7 +915,7 @@
 
          getLog().debug("Subscribing to topic, with an empty selector");
          subSession = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         subscriber = subSession.createDurableSubscriber(topic, "test", "   ", false);
+         subscriber = subSession.createDurableSubscriber(topic, "test", "", false);
 
          getLog().debug("Send a message");
          message = sendSession.createTextMessage("Message2");
@@ -1007,6 +928,7 @@
          getLog().debug("Closing the subscriber");
 
          getLog().debug("Removing the subscription");
+         subscriber.close();
          subSession = topicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
          subSession.unsubscribe("test");
          subSession.close();
@@ -1032,7 +954,6 @@
       try
       {
          queueConnection.start();
-         drainQueue();
          queueConnection.stop();
 
          Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -1043,7 +964,7 @@
          // Send a message that has expired
          TextMessage message = session.createTextMessage("Outdated");
          sender.send(message, DeliveryMode.PERSISTENT, 4, 1);
-         Thread.sleep(100);
+         Thread.sleep(10);
 
          // Send a message that has not expired
          message = session.createTextMessage("OK");
@@ -1051,7 +972,7 @@
 
          // Try to receive the message the not expired message
          queueConnection.start();
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("OK", message.getText());
 
          // Should be no more
@@ -1073,7 +994,6 @@
       try
       {
          queueConnection.start();
-         drainQueue();
 
          Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
          Queue queue = (Queue) context.lookup(TEST_QUEUE);
@@ -1089,7 +1009,7 @@
          // Sleep 6 seconds
          Thread.sleep(6*1000);
          // Try to receive the OK message
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("OK", message.getText());
 
          // Should be no more
@@ -1104,9 +1024,9 @@
          // Sleep 1 seconds
          Thread.sleep(1*1000);
          // Try to receive the messages
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("10 Second Expiration", message.getText());
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("OK", message.getText());
 
          // Should be no more
@@ -1122,9 +1042,9 @@
          // Sleep 6 seconds
          Thread.sleep(6*1000);
          // Try to receive the OK message
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("5 Second Expiration", message.getText());
-         message = (TextMessage) receiver.receiveNoWait();
+         message = (TextMessage) receiver.receive(5000);
          assertEquals("OK", message.getText());
          assertTrue("Didn't expect anymore messages", receiver.receiveNoWait() == null);
       }
@@ -1170,7 +1090,6 @@
       try
       {
          queueConnection.start();
-         drainQueue();
          queueConnection.stop();
 
          Session session = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/JoramUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.jbossmessaging.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.AbstractTestDelegate;
+import org.jboss.test.jbossmessaging.test.joram.JoramTestAdminDelegate;
+
+/**
+ * Joram unit tests
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
+ * @version $Revision$
+ */
+public class JoramUnitTestCase extends org.jboss.test.jms.JoramUnitTestCase
+{
+   public JoramUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   /**
+    * Get the test delegate
+    * 
+    * @param clazz the test class
+    * @return the delegate
+    * @throws Exception for any error
+    */
+   public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+   {
+      return getDelegate(clazz, JoramTestAdminDelegate.class.getName());
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getTestSuite(JoramUnitTestCase.class);
+   }
+   
+}

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageBodyUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -24,7 +24,7 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
-import javax.jms.JMSException;
+
 import javax.jms.Message;
 import javax.jms.ObjectMessage;
 import javax.jms.Queue;
@@ -37,11 +37,9 @@
 import javax.jms.TextMessage;
 import javax.naming.Context;
 
-import junit.framework.Test;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
-import org.jboss.logging.Logger;
-import org.jboss.test.jbossmessaging.JMSTestCase;
-
 /**
  * Tests message bodies.
  *
@@ -50,7 +48,7 @@
  * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
  * @version $Revision$
  */
-public class MessageBodyUnitTestCase extends JMSTestCase
+public class MessageBodyUnitTestCase extends JBossJMSTestCase
 {
    // Provider specific
    public static final String QUEUE_FACTORY = "ConnectionFactory";
@@ -73,6 +71,8 @@
    {
        // call setUp() in the superclass
        super.setUp() ;
+       
+       JMSDestinationsUtil.setupBasicDestinations();
 
       connect();
    }
@@ -81,6 +81,8 @@
    {
       disconnect();
       
+      JMSDestinationsUtil.destroyDestinations();
+      
       // call tearDown() in the superclass to cleanup
       super.tearDown() ;
    }
@@ -292,60 +294,4 @@
       for (int i = 0; i < invalid.length; ++i)
          message.setStringProperty(valid[i], "whatever");
    }
-
-   /**
-    * Test vendor properties.
-    * Test disabled for JBossMessaging
-    */
-   /*public void testVendorProperties() throws Exception
-   {
-      TextMessage message = session.createTextMessage();
-      
-      System.out.println("hello!!!");
-
-      try
-      {
-        message.setStringProperty("JMS_JBOSS_SCHEDULED_DELIVERY", "whenever");
-        fail("invalid type");
-      }
-      catch (JMSException e) {
-    	  e.printStackTrace();
-      }
-      try
-      {
-        message.setObjectProperty("JMS_JBOSS_SCHEDULED_DELIVERY", "10234");
-        fail("invalid type");
-      }
-      catch (JMSException e) {
-    	  e.printStackTrace();
-      }
-      try
-      {
-        message.setStringProperty("JMS_JBOSS_REDELIVERY_COUNT", "fruity");
-        fail("invalid type");
-      }
-      catch (JMSException e) {
-    	  e.printStackTrace();
-      }
-      try
-      {
-        message.setStringProperty("JMS_JBOSS_REDELIVERY_LIMIT", "fruity");
-        fail("invalid type");
-      }
-      catch (JMSException e) {
-    	  e.printStackTrace();
-      }
-
-      message.setLongProperty("JMS_JBOSS_SCHEDULED_DELIVERY", 10234);
-      message.setIntProperty("JMS_JBOSS_REDELIVERY_COUNT", 123);
-      message.setShortProperty("JMS_JBOSS_REDELIVERY_LIMIT", (short)1);
-   } */
-
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(MessageBodyUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/MessageTypesUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -42,7 +42,8 @@
 
 import junit.framework.Test;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Tests of sending/receiving all jms message types to/from a queue
@@ -51,7 +52,7 @@
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class MessageTypesUnitTestCase extends JMSTestCase
+public class MessageTypesUnitTestCase extends JBossJMSTestCase
 {
    static String QUEUE_FACTORY = "ConnectionFactory";
    static String TEST_QUEUE = "queue/testQueue";
@@ -235,6 +236,8 @@
    {
        // call setUp() in superclass
        super.setUp() ;
+       
+       JMSDestinationsUtil.setupBasicDestinations();
 
       context = new InitialContext();
       QueueConnectionFactory queueFactory = (QueueConnectionFactory) context.lookup(QUEUE_FACTORY);
@@ -254,6 +257,8 @@
       receiver.close();
       session.close();
       queueConnection.close();
+      
+      JMSDestinationsUtil.destroyDestinations();
 
       // call tearDown() in superclass
       super.tearDown() ;
@@ -266,11 +271,4 @@
       return out;
    }
 
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(MessageTypesUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/RollBackUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -46,7 +46,8 @@
 import org.jboss.logging.Logger;
 
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Rollback tests
@@ -55,7 +56,7 @@
  * @author
  * @version
  */
-public class RollBackUnitTestCase extends JMSTestCase
+public class RollBackUnitTestCase extends JBossJMSTestCase
 {
 
    // Provider specific
@@ -540,6 +541,8 @@
    {
       super.setUp();
       
+      JMSDestinationsUtil.setupBasicDestinations();
+      
       getLog().debug("START TEST " + getName());
       context = getInitialContext();
 
@@ -549,6 +552,7 @@
       TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createTopicConnection();
       topicDurableConnection = topicFactory.createTopicConnection("john", "needle");
+      topicDurableConnection.setClientID("someClient");
 
       getLog().debug("Connection to JBossMQ established.");
    }
@@ -588,6 +592,10 @@
       catch (JMSException ignored)
       {
       }
+      
+      JMSDestinationsUtil.destroyDestinations();
+      
+      
       super.tearDown();
    }
 
@@ -730,11 +738,5 @@
       return 5;
    }
 
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(RollBackUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
    
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,12 +21,10 @@
  */
 package org.jboss.test.jbossmessaging.test;
 
-import javax.management.ObjectName;
 import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.jboss.test.JBossTestSetup;
+
 import org.jboss.test.jbossmessaging.JMSBase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 /**
  * Test of security features in JMS providers
  *
@@ -36,10 +34,24 @@
  */
 public class SecurityUnitTestCase extends JMSBase
 {
+   private static final String PRECONF_CLIENT_IDCONNECTIONFACTORY = "PreconfClientIDConnectionfactory";
+
    public SecurityUnitTestCase(String name)
    {
       super(name);
    }
+   
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      JMSDestinationsUtil.setupBasicDestinations();
+   }
+   
+   protected void tearDown() throws Exception
+   {
+      JMSDestinationsUtil.destroyDestinations();
+      super.tearDown();
+   }
 
    public void testLoginTest() throws Exception
    {
@@ -270,7 +282,7 @@
          int ic = 5;
          // Publish
          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
-         pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
+         pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic, PRECONF_CLIENT_IDCONNECTIONFACTORY);
          pub1.setUser("john", "needle");
          pub1.connect();
          pub1.publish();
@@ -997,7 +1009,7 @@
          int ic = 5;
          // Set up a durable subscriber
          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message.class, "DURABLE_NR", 0, ic);
-         sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1);
+         sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1, PRECONF_CLIENT_IDCONNECTIONFACTORY);
          sub1.setDurable("john", "needle", "sub2");
          Thread t1 = new Thread(sub1);
          t1.start();
@@ -1056,7 +1068,7 @@
          int ic = 5;
          // Set up a durable subscriber
          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message.class, "DURABLE_NR", 0, ic);
-         sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1);
+         sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1, PRECONF_CLIENT_IDCONNECTIONFACTORY);
          sub1.setDurable("john", "needle", "sub3");
          Thread t1 = new Thread(sub1);
          t1.start();
@@ -1174,11 +1186,4 @@
          }
       }
    }
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(SecurityUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SessionCloseStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SessionCloseStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/SessionCloseStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -37,7 +37,8 @@
 
 import junit.framework.Test;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Tests for receiving while closing the session
@@ -46,7 +47,7 @@
  * @author <a href="mailto:adrian at jboss.org>Adrian Brock</a>
  * @version <tt>$Revision$</tt>
  */
-public class SessionCloseStressTestCase extends JMSTestCase
+public class SessionCloseStressTestCase extends JBossJMSTestCase
 {
    static String QUEUE_FACTORY = "ConnectionFactory";
    static String QUEUE = "queue/testQueue";
@@ -322,12 +323,16 @@
       getLog().debug("Connection closed.");
    }
 
-   public static Test suite() throws Exception
+   public void setUp() throws Exception
    {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       String resourceName = getJMSResourceRelativePathname("test-destinations-service.xml") ;
+      super.setUp();
+      JMSDestinationsUtil.setupBasicDestinations();
+   }
+   
+   public void tearDown() throws Exception
+   {
+      JMSDestinationsUtil.destroyDestinations();
+      super.tearDown();
+   }
 
-       return getDeploySetup(SessionCloseStressTestCase.class,
-               loader.getResource(resourceName).toString());
-   }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/TemporarySessionConnectionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/TemporarySessionConnectionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/TemporarySessionConnectionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -29,7 +29,7 @@
 import javax.jms.TemporaryQueue;
 import javax.naming.Context;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 
 /**
  * Tests for temporaries and session/connection consumer construction
@@ -38,7 +38,7 @@
  * @author <a href="mailto:adrian at jboss.org>Adrian Brock</a>
  * @version <tt>$Revision$</tt>
  */
-public class TemporarySessionConnectionUnitTestCase extends JMSTestCase
+public class TemporarySessionConnectionUnitTestCase extends JBossJMSTestCase
 {
    static String QUEUE_FACTORY = "ConnectionFactory";
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/UnackedUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -44,7 +44,8 @@
 import junit.framework.TestSuite;
 
 import org.jboss.logging.Logger;
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Rollback tests
@@ -53,7 +54,7 @@
  * @author
  * @version $Revision$
  */
-public class UnackedUnitTestCase extends JMSTestCase
+public class UnackedUnitTestCase extends JBossJMSTestCase
 {
    // Provider specific
    static String TOPIC_FACTORY = "ConnectionFactory";
@@ -82,9 +83,7 @@
       suite.addTest(new UnackedUnitTestCase("testUnackedDurableTopic"));
       suite.addTest(new UnackedUnitTestCase("testDummyLast"));
       
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
-      return getDeploySetup(suite, loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
+      return suite;
    }
 
 
@@ -209,8 +208,10 @@
 	      
 	      assertEquals(iterationCount, c1 + c2);
 	      
-	      lastMessageConsumer1.acknowledge();
-	      lastMessageConsumer2.acknowledge();
+	      if(lastMessageConsumer1 != null)
+            lastMessageConsumer1.acknowledge();
+	      if(lastMessageConsumer2 != null)
+            lastMessageConsumer2.acknowledge();
 	
 	      queueConnection.stop();
 	      session1.close();
@@ -463,7 +464,7 @@
 
       sendThread.join();
       topicDurableConnection.close();
-      TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
+      TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup("PreconfClientIDConnectionfactory");
       topicDurableConnection = topicFactory.createTopicConnection("john", "needle");
       queueConnection.stop();
       assertTrue("Topic should be full", drainDurableTopic() == iterationCount);
@@ -574,6 +575,8 @@
    {
        // call setUp() in superclass 
        super.setUp() ;
+       
+       JMSDestinationsUtil.setupBasicDestinations();
 
       if (context == null)
       {
@@ -585,6 +588,7 @@
 
       TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
       topicConnection = topicFactory.createTopicConnection();
+      topicFactory = (TopicConnectionFactory) context.lookup("PreconfClientIDConnectionfactory");
       topicDurableConnection = topicFactory.createTopicConnection("john", "needle");
    }
    
@@ -607,6 +611,10 @@
 		   topicDurableConnection.close();
 		   topicDurableConnection = null;
 	   }
+	   
+	   JMSDestinationsUtil.destroyDestinations();
+	   
+	   super.tearDown();
    }
 
    // Emptys out all the messages in a queue

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -36,7 +36,8 @@
 
 import junit.framework.Test;
 
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * XAResource tests
@@ -45,7 +46,7 @@
  * @author
  * @version
  */
-public class XAResourceUnitTestCase extends JMSTestCase
+public class XAResourceUnitTestCase extends JBossJMSTestCase
 {
    static String XA_TOPIC_FACTORY = "XAConnectionFactory";
    static String FACTORY = "ConnectionFactory";
@@ -56,6 +57,18 @@
    {
       super(name);
    }
+   
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      JMSDestinationsUtil.setupBasicDestinations();
+   }
+   
+   protected void tearDown() throws Exception
+   {
+      JMSDestinationsUtil.destroyDestinations();
+      super.tearDown();
+   }
 
    public void testXAResourceSuspendWorkCommit() throws Exception
    {
@@ -101,6 +114,11 @@
          resource.end(xid2, XAResource.TMSUCCESS);
          resource.commit(xid2, true);
       }
+      catch(Exception e)
+      {
+         e.printStackTrace();
+         throw e;
+      }
       finally
       {
          connection.close();
@@ -162,6 +180,7 @@
          message = subscriber.receiveNoWait();
          if (message == null)
             fail("No message after rollback?");
+         resource.end(xid1, XAResource.TMSUCCESS);
          resource.commit(xid1, true);
 
       }
@@ -200,12 +219,4 @@
          return branch;
       }
    }
-
-   public static Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(XAResourceUnitTestCase.class,
-               loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
-   }
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceWrapperSmokeUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceWrapperSmokeUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/XAResourceWrapperSmokeUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -27,7 +27,7 @@
 import junit.framework.Test;
 
 import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.test.jbossmessaging.JMSTestCase;
+import org.jboss.test.JBossJMSTestCase;
 import org.jboss.test.JBossTestSetup;
 
 /**
@@ -37,7 +37,7 @@
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
-public class XAResourceWrapperSmokeUnitTestCase extends JMSTestCase
+public class XAResourceWrapperSmokeUnitTestCase extends JBossJMSTestCase
 {
    ObjectName name = ObjectNameFactory.create("jboss.test:service=XAWrapperSmoke");
    

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jbossmessaging/test/joram/JoramTestAdminDelegate.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,198 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.jbossmessaging.test.joram;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.test.jms.JMSTestAdmin;
+import org.jboss.test.jms.TestRole;
+import org.jboss.logging.Logger;
+import org.jboss.util.NestedRuntimeException;
+import org.objectweb.jtests.jms.admin.Admin;
+
+/**
+ * JBossMessagingAdmin.
+ * 
+ * @author <a href="richard.achmatowicz at jboss.com">Richard Achmatowicz</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision$
+ */
+public class JoramTestAdminDelegate implements Admin
+{
+   private Logger log = Logger.getLogger(JoramTestAdminDelegate.class);
+
+   private InitialContext initialContext;
+   private MBeanServerConnection server;
+   
+   protected static final ObjectName namingService;
+   
+   static
+   {
+      try
+      {
+         namingService = new ObjectName("jboss:service=NamingBeanImpl");
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public JoramTestAdminDelegate(Class<?> clazz) throws Exception
+   {
+      this();
+   }
+
+   public JoramTestAdminDelegate() throws Exception
+   {
+      try
+      {
+         log.info("Initializing...");
+
+         // set up the initial naming service context
+         initialContext = new InitialContext();
+
+         // set up the MBean server connection
+         String adaptorName = System.getProperty("jbosstest.server.name", "jmx/invoker/RMIAdaptor");
+         server = (MBeanServerConnection) initialContext.lookup(adaptorName);
+
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public String getName()
+   {
+      return this.getClass().getName();
+   }
+
+   private MBeanServerConnection getServer()
+   {
+      return server;
+   }
+
+   public InitialContext createInitialContext() throws NamingException
+   {
+      return initialContext;
+   }
+
+   public void createQueue(String name)
+   {
+      try
+      {
+         JMSTestAdmin.getAdmin().createQueue(name, new String[]{name});
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void deleteQueue(String name)
+   {
+      try
+      {
+         JMSTestAdmin.getAdmin().deleteQueue(name);
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void createTopic(String name)
+   {
+      try
+      {
+         JMSTestAdmin.getAdmin().createTopic(name, new String[]{name});
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void deleteTopic(String name)
+   {
+      try
+      {
+         JMSTestAdmin.getAdmin().deleteTopic(name);
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void createConnectionFactory(String name)
+   {
+      try
+      {
+         MBeanServerConnection server = getServer();
+         server.invoke(namingService, "createAlias", new Object[] { name, "ConnectionFactory" }, new String[] { String.class.getName(), String.class.getName() });
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void deleteConnectionFactory(String name)
+   {
+      try
+      {
+         MBeanServerConnection server = getServer();
+         server.invoke(namingService, "removeAlias", new Object[] { name }, new String[] { String.class.getName() });
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   public void createQueueConnectionFactory(String name)
+   {
+      createConnectionFactory(name);
+   }
+
+   public void deleteQueueConnectionFactory(String name)
+   {
+      deleteConnectionFactory(name);
+   }
+
+   public void createTopicConnectionFactory(String name)
+   {
+      createConnectionFactory(name);
+   }
+
+   public void deleteTopicConnectionFactory(String name)
+   {
+      deleteConnectionFactory(name);
+   }
+
+}

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/ejb/TransactionActiveBean.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/ejb/TransactionActiveBean.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/ejb/TransactionActiveBean.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -226,7 +226,7 @@
                c.start();
                Session s = c.createSession(true, Session.SESSION_TRANSACTED);
                MessageConsumer mc = s.createConsumer(queue);
-               while (mc.receive(1000) != null);
+               while (mc.receiveNoWait() != null);
                mc.close();
                
                MessageProducer p = s.createProducer(queue);
@@ -283,9 +283,8 @@
                c.start();
                Session s = c.createSession(true, Session.SESSION_TRANSACTED);
                MessageConsumer mc = s.createConsumer(queue);
-               mc.receive(1000);
+               mc.receiveNoWait();
                mc.close();
-               
                try
                {
                   Thread.sleep(10000);
@@ -297,6 +296,7 @@
                try
                {
                   MessageProducer p = s.createProducer(queue);
+
                   Message m = s.createTextMessage("100");
                   p.send(m);
                }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/test/ExecuteJMSDuringRollbackStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/test/ExecuteJMSDuringRollbackStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jca/test/ExecuteJMSDuringRollbackStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -38,10 +38,12 @@
 import javax.transaction.TransactionManager;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.logging.Logger;
-import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.util.ejb.EJBTestCase;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.tm.TransactionManagerLocator;
 import org.jboss.tm.TxUtils;
 
@@ -364,6 +366,22 @@
 
    public static Test suite() throws Exception
    {
-      return JBossTestCase.getDeploySetup(ExecuteJMSDuringRollbackStressTestCase.class, "jcaexecutejmsrollback.jar");
+      return new JBossTestSetup(new TestSuite(ExecuteJMSDuringRollbackStressTestCase.class))
+      {
+         public void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy("jcaexecutejmsrollback.jar");
+            
+         }
+         
+         public void tearDown() throws Exception
+         {
+            undeploy("jcaexecutejmsrollback.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
    }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaJMSSessionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaJMSSessionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaJMSSessionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -29,6 +29,7 @@
 import org.jboss.test.client.test.AppClientUnitTestCase;
 
 import org.jboss.test.jmsra.bean.*;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -65,14 +66,14 @@
          {
             super.setUp();
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+            JMSDestinationsUtil.setupBasicDestinations();
             deploy ("jmsra.jar");
          }
          protected void tearDown() throws Exception
          {
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             undeploy ("jmsra.jar");
-            undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+            JMSDestinationsUtil.destroyDestinations();
          }
       });
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaQueueUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaQueueUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaQueueUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -33,8 +33,10 @@
 import javax.naming.Context;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Test cases for JMS Resource Adapter use a <em>Queue</em> . <p>
@@ -85,29 +87,22 @@
 
    public static Test suite() throws Exception
    {
-      return new JBossTestSetup(getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar"))
+      return new JBossTestSetup(new TestSuite(RaQueueUnitTestCase.class))
          {
             protected void setUp() throws Exception
             {
                super.setUp();
-               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-               deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+               
+               JMSDestinationsUtil.setupBasicDestinations();
+               this.deploy("jmsra.jar");
+               
             }
 
              protected void tearDown() throws Exception
              {
+                JMSDestinationsUtil.destroyDestinations();
+                undeploy("jmsra.jar");
                 super.tearDown();
-
-                // Remove the messages
-                getServer().invoke
-                (
-                   new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                   "removeAllMessages",
-                   new Object[0],
-                   new String[0]
-                );
-                ClassLoader loader = Thread.currentThread().getContextClassLoader();
-                undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
              }
           };
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaSyncRecUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaSyncRecUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaSyncRecUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -36,6 +36,7 @@
 
 import javax.naming.InitialContext;
 import junit.framework.Assert;
+import junit.framework.TestSuite;
 
 import junit.framework.Test;
 
@@ -43,6 +44,7 @@
 import org.jboss.test.JBossTestSetup;
 
 import org.jboss.test.jmsra.bean.*;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * 
@@ -168,29 +170,20 @@
 
    public static Test suite() throws Exception
    {
-      return new JBossTestSetup(getDeploySetup(RaSyncRecUnitTestCase.class, "jmsra.jar"))
+      return new JBossTestSetup(new TestSuite(RaSyncRecUnitTestCase.class))
          {
             protected void setUp() throws Exception
             {
                super.setUp();
-               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-               deploy (loader.getResource("messaging/test-destinations-full-service.xml").toString());
+               JMSDestinationsUtil.setupBasicDestinations();
+               deploy("jmsra.jar");
             }
 
              protected void tearDown() throws Exception
              {
+                undeploy("jmsra.jar");
+                JMSDestinationsUtil.destroyDestinations();
                 super.tearDown();
-
-                // Remove the messages
-                getServer().invoke
-                (
-                   new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                   "removeAllMessages",
-                   new Object[0],
-                   new String[0]
-                );
-                ClassLoader loader = Thread.currentThread().getContextClassLoader();
-                undeploy (loader.getResource("messaging/test-destinations-full-service.xml").toString());
              }
           };
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -284,12 +284,5 @@
       // getLog().debug(" > Flushed");
    }
 
-   public static junit.framework.Test suite() throws Exception
-   {
-       ClassLoader loader = Thread.currentThread().getContextClassLoader();
-       return getDeploySetup(RaTest.class,
-               loader.getResource("messaging/test-destinations-service.xml").toString());
-   }
 
-
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTopicUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTopicUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmsra/test/RaTopicUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -33,8 +33,10 @@
 import javax.naming.Context;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Test cases for JMS Resource Adapter using a <em>Topic</em> . <p>
@@ -85,29 +87,20 @@
 
    public static Test suite() throws Exception
    {
-      return new JBossTestSetup(getDeploySetup(RaQueueUnitTestCase.class, "jmsra.jar"))
+      return new JBossTestSetup(new TestSuite(RaQueueUnitTestCase.class))
          {
             protected void setUp() throws Exception
             {
                super.setUp();
-               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-               deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
+               JMSDestinationsUtil.setupBasicDestinations();
+               deploy("jmsra.jar");
             }
 
              protected void tearDown() throws Exception
              {
+                undeploy("jmsra.jar");
+                JMSDestinationsUtil.destroyDestinations();
                 super.tearDown();
-
-                // Remove the messages
-                getServer().invoke
-                (
-                   new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                   "removeAllMessages",
-                   new Object[0],
-                   new String[0]
-                );
-                ClassLoader loader = Thread.currentThread().getContextClassLoader();
-                undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
              }
           };
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/jmx/test/RedeployStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,8 +21,6 @@
  */
 package org.jboss.test.jmx.test;
 
-import javax.management.ObjectName;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
@@ -53,27 +51,9 @@
          protected void setUp() throws Exception
          {
             super.setUp();
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy(loader.getResource("messaging/test-destinations-full-service.xml").toString());
          }
          protected void tearDown() throws Exception
          {
-            try
-            {
-               // Remove all the messages created during this test
-               getServer().invoke
-               (
-                  new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                  "removeAllMessages",
-                  new Object[0],
-                  new String[0]
-               );
-            }
-            catch(Exception e)
-            {
-            }
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            undeploy(loader.getResource("messaging/test-destinations-full-service.xml").toString());
             super.tearDown();
          
          }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -40,6 +40,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.jboss.test.JBossJMSTestCase;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.JBossTestSetup;
 import org.jboss.test.mdb.bean.CustomMessage;
@@ -70,7 +71,7 @@
  * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
  * @version $Revision$
  */
-public class MDBUnitTestCase extends JBossTestCase
+public class MDBUnitTestCase extends JBossJMSTestCase
 {
    // Static --------------------------------------------------------
 
@@ -270,32 +271,22 @@
 
       Test wrapper = new JBossTestSetup(suite)
       {
+         
+         ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
          protected void setUp() throws Exception
          {
             super.setUp();
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
+            MDBUnitTestCase.deployQueue("testObjectMessage");
+            deploy(loader.getResource("hornetq/hornetq-jms.xml").toString());
+            deploy(loader.getResource("hornetq/hornetq-queues.xml").toString());
             deploy("mdb.jar");
          }
 
          protected void tearDown() throws Exception
          {
             super.tearDown();
-
-            // Remove the DLQ messages created by the TxTimeout test
-            try
-            {
-               getServer().invoke(
-                     new ObjectName(
-                           "jboss.messaging.destination:service=Queue,name=DLQ"),
-                     "removeAllMessages", new Object[0], new String[0]);
-            }
-            catch (Exception ignored)
-            {
-               getLog().warn("unable to clear dlq", ignored);
-            }
-
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             try
             {
@@ -305,39 +296,23 @@
             {
                getLog().warn("Unable to undeploy mdb.jar", ignored);
             }
-
             try
             {
-               // Remove the durable subscription
-               TopicConnectionFactory topicFactory = (TopicConnectionFactory) getInitialContext()
-                     .lookup(TOPIC_FACTORY);
-               TopicConnection topicConnection = topicFactory
-                     .createTopicConnection("john", "needle");
-               try
-               {
-                  TopicSession session = topicConnection.createTopicSession(false,
-                     Session.AUTO_ACKNOWLEDGE);
-                  session.unsubscribe("DurableSubscriberExample");
-               }
-               finally
-               {
-                  topicConnection.close();
-               }
+               undeploy(loader.getResource("hornetq/hornetq-jms.xml").toString());
             }
             catch (Exception ignored)
             {
-               getLog().warn("Unable to unsubscribe", ignored);
+               getLog().warn("Unable to undeploy hornetq/hornetq-jms.xml", ignored);
             }
-
             try
             {
-               undeploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
+               undeploy(loader.getResource("hornetq/hornetq-queues.xml").toString());
             }
             catch (Exception ignored)
             {
-               getLog().warn("Unable to remove destinations", ignored);
+               getLog().warn("Unable to undeploy hornetq/hornetq-jms.xml", ignored);
             }
+            MDBUnitTestCase.undeployDestinations();
          }
       };
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -40,9 +40,12 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.jboss.test.jms.JMSTestAdmin;
 import org.jboss.test.mdbsessionpoolclear.bean.TestStatus;
 import org.jboss.test.mdbsessionpoolclear.bean.TestStatusHome;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.logging.Logger;
+import org.jboss.test.JBossJMSTestCase;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.JBossTestSetup;
 
@@ -52,7 +55,7 @@
  * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
  * @version $Id$
  */
-public class MDBUnitTestCase extends JBossTestCase
+public class MDBUnitTestCase extends JBossJMSTestCase
 {
    private static final Logger log = Logger.getLogger(MDBUnitTestCase.class);
 
@@ -60,6 +63,7 @@
    {
       super(name);
    }
+   
 
   
    public void testMdb() throws Exception
@@ -174,6 +178,7 @@
          protected void setUp() throws Exception
          {
             super.setUp();
+            MDBUnitTestCase.deployQueue("mdbsessionpoolclearQueue");
             deploy("mdbsessionpoolclear.jar");
          }
 
@@ -181,19 +186,9 @@
          {
             super.tearDown();
 
-            // Remove the DLQ messages
-            try
-            {
-               getServer().invoke(
-                  new ObjectName("jboss.messaging.destination:service=Queue,name=DLQ"),
-                  "removeAllMessages", new Object[0], new String[0]);
-            }
-            catch (Exception ignored)
-            {
-               getLog().warn("unable to clear dlq", ignored);
-            }
+            
+            JMSDestinationsUtil.purgeQueue("/queue/DLQ");
 
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
             try
             {
                undeploy("mdbsessionpoolclear.jar");
@@ -202,6 +197,8 @@
             {
                getLog().warn("Unable to undeploy mdbsessionpoolclear.jar", ignored);
             }
+            
+            MDBUnitTestCase.undeployDestinations();
          }
       };
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -30,14 +30,14 @@
 import javax.jms.Message;
 import javax.jms.MessageListener;
 import javax.transaction.Transaction;
- 
+
 import org.jboss.logging.Logger;
 import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.test.messagedriven.mbeans.TestMessageDrivenManagementMBean;
 
 /**
- * A Test Message Driven Bean 
- *
+ * A Test Message Driven Bean
+ * 
  * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
  * @version <tt>$Revision: 1.4</tt>
  */
@@ -47,48 +47,53 @@
    private static final long serialVersionUID = 1L;
 
    protected static final Logger log = Logger.getLogger(TestMessageDriven.class);
-   
+
    protected MessageDrivenContext ctx;
    protected TestMessageDrivenManagementMBean mbean;
-   
-   /** Replaces legacy org.jboss.ejb.plugins.jms.DLQHandler.JBOSS_ORIG_DESTINATION */
+
+   /**
+    * Replaces legacy
+    * org.jboss.ejb.plugins.jms.DLQHandler.JBOSS_ORIG_DESTINATION
+    */
    private static final String JBOSS_DESTINATION = "JBOSS_ORIG_DESTINATION";
-   
+
    public void onMessage(Message message)
    {
-      log.info("Got message: " + message);
-      mbean.addMessage(message);
-      if (isDLQ(message))
-         return;
-      logProperties();
-      logTransaction();
-      String rollback = getRollback();
-      if (rollback.equals("DLQ"))
+      synchronized (TestMessageDriven.class)
       {
-         log.info("Rollback DLQ");
-         ctx.setRollbackOnly();
+         log.info("Got message: " + message);
+         mbean.addMessage(message);
+         if (isDLQ(message))
+            return;
+         logProperties();
+         logTransaction();
+         String rollback = getRollback();
+         if (rollback.equals("DLQ"))
+         {
+            log.info("Rollback DLQ");
+            ctx.setRollbackOnly();
+         }
       }
    }
-   
+
    public boolean isDLQ(Message message)
    {
       try
       {
          if (message.getStringProperty(JBOSS_DESTINATION) != null)
             return true;
-      }
-      catch (JMSException e)
+      } catch (JMSException e)
       {
          log.error("Unhandled error", e);
       }
       return false;
    }
-   
+
    public String getRollback()
    {
       return System.getProperty("test.messagedriven.rollback", "None");
    }
-   
+
    public void logProperties()
    {
       Properties props = System.getProperties();
@@ -99,19 +104,20 @@
             log.info(key + "=" + props.getProperty(key));
       }
    }
-   
+
    public Transaction logTransaction()
    {
       Transaction tx = mbean.getTransaction();
       log.info("tx=" + tx);
       return tx;
    }
-   
+
    public void ejbCreate()
    {
-      mbean = (TestMessageDrivenManagementMBean) MBeanProxyExt.create(TestMessageDrivenManagementMBean.class, TestMessageDrivenManagementMBean.OBJECT_NAME);
+      mbean = (TestMessageDrivenManagementMBean) MBeanProxyExt.create(TestMessageDrivenManagementMBean.class,
+            TestMessageDrivenManagementMBean.OBJECT_NAME);
    }
-   
+
    public void ejbRemove()
    {
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -30,6 +30,7 @@
 import java.util.Properties;
 
 import javax.jms.Message;
+import javax.jms.TextMessage;
 import javax.naming.InitialContext;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
@@ -70,7 +71,7 @@
       defaultProps.put("createDestination", "false");
    }
    
-   protected ArrayList messages = new ArrayList();
+   protected ArrayList<Object[]> messages = new ArrayList<Object[]>();
    
    public TestMessageDrivenManagement() throws Exception
    {
@@ -98,15 +99,32 @@
    {
       synchronized (messages)
       {
-         messages.add(cloneMessage(message));
+         try
+         {
+            Properties props = new Properties();
+            
+            Enumeration<?> names = message.getPropertyNames();
+            while (names.hasMoreElements())
+            {
+               String key = names.nextElement().toString();
+               props.put(key, message.getObjectProperty(key));
+               
+            }
+            messages.add(new Object[]{((TextMessage)message).getText(), message.getJMSDestination(), props});
+         }
+         catch (Throwable e)
+         {
+            log.warn("Error on retreiving message's text ", e);
+         }
       }
    }
 
-   public ArrayList getMessages()
+   public ArrayList<Object[]> getMessages()
    {
       synchronized (messages)
       {
-         ArrayList result = new ArrayList(messages);
+         ArrayList<Object[]> result = new ArrayList<Object[]>(messages);
+         
          messages.clear();
          return result;
       }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -44,6 +44,6 @@
    void initProperties(Properties props);
    void setEjbParsingDeployer(EjbParsingDeployerMBean deployer);
    void addMessage(Message message);
-   ArrayList getMessages();
+   ArrayList<Object[]> getMessages();
    Transaction getTransaction();
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,7 +21,6 @@
  */
 package org.jboss.test.messagedriven.support;
 
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Properties;
@@ -31,18 +30,19 @@
 import javax.jms.Destination;
 import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
-import javax.jms.Message;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.management.Attribute;
 import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
+import javax.naming.NamingException;
 
 import org.jboss.mx.util.ObjectNameFactory;
 import org.jboss.naming.Util;
-import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.jms.JMSTestAdmin;
 import org.jboss.test.messagedriven.mbeans.TestMessageDrivenManagementMBean;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Basic tests of message driven beans 
@@ -50,68 +50,43 @@
  * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
  * @version <tt>$Revision: 1.4</tt>
  */
-public abstract class BasicMessageDrivenUnitTest extends JBossTestCase implements ExceptionListener
+public abstract class BasicMessageDrivenUnitTest extends JBossJMSTestCase implements ExceptionListener
 {
    protected static final long WAIT_TIME = 5000L;
    protected static final long REPEATED_WAIT = 4;
 
    protected static ObjectName ejbParsingDeployer = ObjectNameFactory.create("jboss.ejb:service=EjbParsingDeployer");
 
-   protected static ObjectName testQueue = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=testQueue");
+   protected static ObjectName testQueue = JMSTestAdmin.getAdmin().createQueueJMXName("testQueue");
    protected static Properties testQueueProps = new Properties();
    protected static Properties testQueueNoDestinationTypeProps = new Properties();
    
-   protected static ObjectName testTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testTopic");
+   protected static ObjectName testTopic = JMSTestAdmin.getAdmin().createTopicJMXName("testTopic");
    protected static Properties testTopicProps = new Properties();
    protected static Properties testTopicNoDestinationTypeProps = new Properties();
    
-   protected static ObjectName testDurableTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testDurableTopic");
+   protected static ObjectName testDurableTopic = JMSTestAdmin.getAdmin().createTopicJMXName("testDurableTopic");
    protected static Properties testDurableTopicProps = new Properties();
 
-   protected static ObjectName dlqJMXDestination = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=DLQ");
-
-   protected static String destinations = "messaging/test-destinations-full-service.xml";
-   
-   protected static boolean isJBossMessaging()
-   {
-      try
-      {
-         return "false".equalsIgnoreCase(System.getProperty("jbosstest.useJBM", "true")) == false;
-      }
-      catch (Exception e)
-      {
-         return true;
-      }
-   }
-   
+   protected static ObjectName dlqJMXDestination = JMSTestAdmin.getAdmin().createQueueJMXName("DLQ");
+    
    static
    {
-	   
-	   
-	  if (isJBossMessaging())
-	  {
-		   testQueue = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=testQueue");
-		   testTopic = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=testTopic");
-		   testDurableTopic = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=testDurableTopic");
-		   dlqJMXDestination = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=DLQ");
-		   destinations = "jbossmessaging/test-destinations-full-service.xml";
-	  }
-	   
-      testQueueProps.put("destination", "queue/testQueue");
+      testQueueProps.put("destination", "testQueue");
       testQueueProps.put("destinationType", "javax.jms.Queue");
 
-      testQueueNoDestinationTypeProps.put("destination", "queue/testQueue");
+      testQueueNoDestinationTypeProps.put("destination", "testQueue");
       testQueueNoDestinationTypeProps.put("destinationType", "");
 
-      testTopicProps.put("destination", "topic/testTopic");
+      testTopicProps.put("destination", "testTopic");
       testTopicProps.put("destinationType", "javax.jms.Topic");
 
-      testTopicNoDestinationTypeProps.put("destination", "topic/testTopic");
+      testTopicNoDestinationTypeProps.put("destination", "testTopic");
       testTopicNoDestinationTypeProps.put("destinationType", "");
 
-      testDurableTopicProps.put("destination", "topic/testDurableTopic");
+      testDurableTopicProps.put("destination", "testDurableTopic");
       testDurableTopicProps.put("destinationType", "javax.jms.Topic");
-      //testDurableTopicProps.put("clientID", "DurableSubscriberExample");
+      testDurableTopicProps.put("clientID", "DurableSubscriberExample");
       testDurableTopicProps.put("durability", "Durable");
       testDurableTopicProps.put("subscriptionName", "messagedriven");
       testDurableTopicProps.put("user", "john");
@@ -134,7 +109,7 @@
    protected Connection connection;
    protected Session session;
    protected HashMap producers = new HashMap();
-   protected ArrayList messages = new ArrayList(); 
+   protected ArrayList<Object[]> messages = new ArrayList<Object[]>(); 
 
    public BasicMessageDrivenUnitTest(String name, ObjectName jmxDestination, Properties defaultProps)
    {
@@ -149,7 +124,16 @@
       try
       {
          for (int i = 0; i < ops.length; ++i)
-            ops[i].run();
+         {
+            try
+            {
+                  ops[i].run();
+            }
+            catch (Throwable e)
+            {
+               throw new RuntimeException("Failure at operation " + i, e);
+            }
+         }
       }
       finally
       {
@@ -176,8 +160,18 @@
    {
       if (destination != null)
          return destination;
-      String jndiName = (String) getAttribute(getJMXDestination(), "JNDIName");
-      destination = (Destination) lookup(jndiName, Destination.class);
+      
+      String name = (String)getAttribute(getJMXDestination(), "Name");
+      try
+      {
+         String jndiName = "/queue/" + name;
+         destination = (Destination) lookup(jndiName, Destination.class);
+      }
+      catch (NamingException e)
+      {
+         String jndiName = "/topic/" + name;
+         destination = (Destination) lookup(jndiName, Destination.class);
+      }
       return destination;
    }
    
@@ -185,7 +179,7 @@
    {
       if (dlqDestination != null)
          return dlqDestination;
-      String jndiName = (String) getAttribute(getDLQJMXDestination(), "JNDIName");
+      String jndiName = "/queue/" + getAttribute(getDLQJMXDestination(), "Name");
       dlqDestination = (Destination) lookup(jndiName, Destination.class);
       return dlqDestination;
    }
@@ -222,17 +216,27 @@
       return connection;
    }
    
-   public Connection getConnection(String user, String password) throws Exception
+   public Connection getConnection(String user, String password, String clientID) throws Exception
    {
       if (connection != null)
          return connection;
 
       ConnectionFactory factory = (ConnectionFactory) lookup(connectionFactoryJNDI, ConnectionFactory.class);
       connection = factory.createConnection(user, password);
+      if (clientID != null)
+      {
+         connection.setClientID(clientID);
+      }
       connection.setExceptionListener(this);
       return connection;
    }
    
+   
+//   public Connection getConnection(String user, String password) throws Exception
+//   {
+//      return getConnection(user, password, null);
+//   }
+//   
    public void onException(JMSException e)
    {
       log.debug("Notified of error", e);
@@ -256,29 +260,9 @@
    
    protected void deployDestinations() throws Exception
    {
-      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      URL url = classLoader.getResource(destinations);
-      if (url == null)
-         throw new Error(destinations + " not found");
-      deploy(url.toString());
+      JMSDestinationsUtil.setupBasicDestinations();
    }
    
-   protected void undeployDestinations() throws Exception
-   {
-      try
-      {
-         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-         URL url = classLoader.getResource(destinations);
-         if (url == null)
-            throw new Error(destinations + " not found");
-         undeploy(url.toString());
-      }
-      catch (Throwable t)
-      {
-         getLog().error("Error undeploying: " + destinations, t);
-      }
-   }
-   
    protected void setUp() throws Exception
    {
 	  super.setUp();
@@ -307,7 +291,7 @@
          getLog().error("Error undeploying: " + mbeansar, t);
       }
       if (isDeployDestinations())
-         undeployDestinations();
+         JMSDestinationsUtil.destroyDestinations();
       super.tearDown();
    }
    
@@ -324,38 +308,27 @@
    protected void startTest(Properties props) throws Exception
    {
       this.props = props;
+       
       if (isClearDestination())
          clearMessages(getJMXDestination());
       clearMessages(getDLQJMXDestination());
       tidyup(props);
       initProperties(props);
-      MBeanServerConnection server = getServer();
-      // Boolean previous = (Boolean) server.getAttribute(ejbParsingDeployer, "UseValidation");
-      // server.setAttribute(ejbParsingDeployer, new Attribute("UseValidation", Boolean.FALSE));
       
-      // UseValidation is set to Boolean.False in TestMessageDrivenMangagement startService
-      // and to previous on stopService
+      deploy(getMDBDeployment());
+
       try
       {
-         deploy(getMDBDeployment());
-
-         try
-         {
-            // FIXME Need to wait for asynchrounous bootstrap of container
-            Thread.sleep(5000);
-            startReceiverThread();
-         }
-         catch (Exception e)
-         {
-            undeploy(getMDBDeployment());
-            throw e;
-         }
+//         // FIXME Need to wait for asynchrounous bootstrap of container
+//         Thread.sleep(5000);
+         startReceiverThread();
       }
-      finally
+      catch (Exception e)
       {
-//         server.setAttribute(ejbParsingDeployer, new Attribute("UseValidation", previous));
+         undeploy(getMDBDeployment());
+         throw e;
       }
-   }
+    }
 
    protected void stopTest()
    {
@@ -397,6 +370,16 @@
       {
          getLog().error("Error clearing messages: " + getDLQJMXDestination(), t);
       }
+      
+      try
+      {
+         JMSDestinationsUtil.destroyEveryDestination();
+      }
+      catch (Throwable t)
+      {
+         getLog().error("Error Destroying Queues", t);
+      }
+      
    }
    
    protected void clearMessages(ObjectName name) throws Exception
@@ -404,7 +387,7 @@
       if (name != null)
       {
          getLog().info("Clearing messages " + name);
-         getServer().invoke(name, "removeAllMessages", new Object[0], new String[0]);
+         getServer().invoke(name, "removeMessages", new Object[]{""}, new String[]{String.class.getName()});
       }
    }
    
@@ -414,15 +397,20 @@
       if (name != null)
       {
          String user = props.getProperty("user");
+
+         String clientID = props.getProperty("clientID");
+         
          if (user != null)
          {
             String password = props.getProperty("password");
-            getConnection(user, password);
+            getConnection(user, password, clientID);
          }
          else
             getConnection();
          try
          {
+            
+            
             Session session = getSession();
             try
             {
@@ -430,7 +418,7 @@
             }
             catch (Throwable t)
             {
-               log.debug("Unsubscribe failed: ", t);
+               log.warn("Unsubscribe failed: ", t);
             }
          }
          finally
@@ -487,11 +475,11 @@
       }
    }
    
-   protected ArrayList getMessages() throws Exception
+   protected ArrayList<Object[]> getMessages() throws Exception
    {
       synchronized (this)
       {
-         return new ArrayList(messages);
+         return new ArrayList<Object[]>(messages);
       }
    }
    
@@ -544,6 +532,7 @@
             while (true)
             {
                ArrayList result = (ArrayList) getAttribute(TestMessageDrivenManagementMBean.OBJECT_NAME, "Messages");
+               log.info("Trying to get more results "  + result.size());
                synchronized (BasicMessageDrivenUnitTest.this)
                {
                   if (running == false)

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -51,8 +51,8 @@
 
    public void run() throws Exception
    {
-      TextMessage message = (TextMessage) test.getMessages().get(msgNo);
-      Destination msgdest = message.getJMSDestination();
+      Object message[] = test.getMessages().get(msgNo);
+      Destination msgdest = (Destination)message[1];
       if (destination == null)
          destination = test.getDestination();
       

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,7 +21,7 @@
  */
 package org.jboss.test.messagedriven.support;
 
-import javax.jms.Message;
+import java.util.Properties;
 
 /**
  * Check a message property
@@ -45,10 +45,11 @@
 
    public void run() throws Exception
    {
-      Message message = (Message) test.getMessages().get(msgNo);
-      if (message.propertyExists(property) == false)
+      Object message[] = (Object[]) test.getMessages().get(msgNo);
+      Properties properties = (Properties)message[2];
+      if (properties.containsKey(property) == false)
          throw new Exception("For msgNo=" + msgNo + " property does not exist property= " + property + " Expected=" + value + " msg=" + message);
-      Object actual = message.getObjectProperty(property);
+      Object actual = properties.get(property);
       if (value.equals(actual) == false)
          throw new Exception("For msgNo=" + msgNo + " property= " + property + " Expected=" + value + " actual=" + actual + " msg=" + message);
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -56,13 +56,6 @@
       props.put("transactionType", "Bean");
       runTest(getOperations(), props);
    }
-   
-   public void testSimpleDLQ() throws Exception
-   {
-      Properties props = (Properties) defaultProps.clone();
-      props.put("rollback", "DLQ");
-      runTest(getDLQOperations(), props);
-   }
 
    public Operation[] getOperations() throws Exception
    {
@@ -75,26 +68,4 @@
       };
    }
 
-   public Operation[] getDLQOperations() throws Exception
-   {
-      return new Operation[]
-      {
-         new SendMessageOperation(this, "1"),
-         new CheckMessageSizeOperation(this, 7, 500),
-         new CheckJMSDestinationOperation(this, 0),
-         new CheckJMSDestinationOperation(this, 1),
-         new CheckJMSDestinationOperation(this, 2),
-         new CheckJMSDestinationOperation(this, 3),
-         new CheckJMSDestinationOperation(this, 4),
-         new CheckJMSDestinationOperation(this, 5),
-         new CheckJMSDestinationOperation(this, 6, getDLQDestination()),
-         new CheckMessageIDOperation(this, 0, "1"),
-         new CheckMessageIDOperation(this, 1, "1"),
-         new CheckMessageIDOperation(this, 2, "1"),
-         new CheckMessageIDOperation(this, 3, "1"),
-         new CheckMessageIDOperation(this, 4, "1"),
-         new CheckMessageIDOperation(this, 5, "1"),
-         new CheckMessageIDOperation(this, 6, "1")
-      };
-   }
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -52,26 +52,20 @@
    
    public void testRestartJMS() throws Exception
    {
-	  if (isJBossMessaging() == false)
-	  {
-	      Operation[] operations = new Operation[]
-	      {
-	         new SendMessageOperation(this, "1"),
-	         new CheckMessageSizeOperation(this, 1, 0),
-	         new CheckJMSDestinationOperation(this, 0, getDestination()),
-	         new CheckMessageIDOperation(this, 0, "1"),
-	         new StopOperation(this, persistenceManager),
-	         new StartOperation(this, persistenceManager),
-	         new SendMessageOperation(this, "2"),
-	         new CheckMessageSizeOperation(this, 2, 20000),
-	         new CheckJMSDestinationOperation(this, 0, getDestination()),
-	      };
-	      runTest(operations, defaultProps);
-	  }
-	  else
-	  {
+//      Operation[] operations = new Operation[]
+//      {
+//         new SendMessageOperation(this, "1"),
+//         new CheckMessageSizeOperation(this, 1, 0),
+//         new CheckJMSDestinationOperation(this, 0, getDestination()),
+//         new CheckMessageIDOperation(this, 0, "1"),
+//         new StopOperation(this, persistenceManager),
+//         new StartOperation(this, persistenceManager),
+//         new SendMessageOperation(this, "2"),
+//         new CheckMessageSizeOperation(this, 2, 20000),
+//         new CheckJMSDestinationOperation(this, 0, getDestination()),
+//      };
+//      runTest(operations, defaultProps);
 		  System.out.println("FIXME testRestartJMS for JBoss Messaging");
-	  }
    }
   
    public Operation[] getDeliveryActiveOperations() throws Exception

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -26,6 +26,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.test.jms.JMSTestAdmin;
 import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
 
 /**
@@ -42,10 +43,7 @@
    
    static
    {
-      if (isJBossMessaging())
-         destinationName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=CreateDestination");
-      else
-         destinationName = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=queue/CreateDestination");
+      destinationName = JMSTestAdmin.getAdmin().createQueueJMXName("CreateDestination"); 
       testProps = (Properties) testQueueProps.clone();
       testProps.put("destination", "CreateDestination");
       testProps.put("createDestination", "true");

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -26,6 +26,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.test.jms.JMSTestAdmin;
 import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
 
 /**
@@ -42,10 +43,7 @@
    
    static
    {
-      if (isJBossMessaging())
-         destinationName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=CreateDestination");
-      else
-         destinationName = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=topic/CreateDestination");
+      destinationName = JMSTestAdmin.getAdmin().createTopicJMXName("CreateDestination"); 
       testProps = (Properties) testTopicProps.clone();
       testProps.put("destination", "CreateDestination");
       testProps.put("createDestination", "true");

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/ENCUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/ENCUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/ENCUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -35,9 +35,11 @@
 import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.naming.interfaces.TestENCHome;
 import org.jboss.test.naming.interfaces.TestENCHome2;
 import org.jboss.test.naming.interfaces.TestENC;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /**
  * Tests of the secure access to EJBs.
@@ -92,14 +94,29 @@
       bean.accessENC();
       bean.remove();
    }
-
+   
    public static Test suite() throws Exception
    {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      URL url = loader.getResource("messaging/test-destinations-full-service.xml");
-      if (url == null)
-         throw new RuntimeException("test queues not found");
-      return getDeploySetup(ENCUnitTestCase.class, url.toString() + ",naming.jar");
+      TestSuite suite = new TestSuite();
+   
+      suite.addTest(new JBossTestSetup(new TestSuite(ENCUnitTestCase.class))
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy ("naming.jar");
+         }
+         protected void tearDown() throws Exception
+         {
+            super.tearDown();
+            undeploy ("naming.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      });
+      
+      return suite;
    }
 
+
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/NamingStressTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/NamingStressTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/naming/test/NamingStressTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,13 +21,16 @@
  */
 package org.jboss.test.naming.test;
 
-import java.net.URL;
 import java.util.Properties;
+
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
 import org.jboss.test.JBossTestSuite;
 import org.jboss.test.naming.ejb.NamingTests;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 
 /** Stress tests for the JNDI naming layer
  *
@@ -43,18 +46,34 @@
 
    public static Test suite() throws Exception
    {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      URL url = loader.getResource("messaging/test-destinations-full-service.xml");
-      if (url == null)
-         throw new RuntimeException("test queues not found");
-
       Properties props = new Properties();
       props.setProperty("ejbRunnerJndiName", "EJBTestRunnerHome");
       props.setProperty("encBeanJndiName", "ENCBean");
       props.setProperty("encIterations", "1000");
+
       JBossTestSuite testSuite = new JBossTestSuite(props);
-      testSuite.addTestSuite(NamingTests.class);
-      return getDeploySetup(testSuite, url+",naming.jar");
+      
+      JBossTestSetup test = new JBossTestSetup(new TestSuite(NamingTests.class))
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            JMSDestinationsUtil.setupBasicDestinations();
+            deploy ("naming.jar");
+         }
+         protected void tearDown() throws Exception
+         {
+            super.tearDown();
+            undeploy ("naming.jar");
+            JMSDestinationsUtil.destroyDestinations();
+         }
+      };
+      
+      testSuite.addTest(test);
+      
+      return testSuite;
+      
+      
    }
 
 }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/refs/test/ResourceResolutionUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/refs/test/ResourceResolutionUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/refs/test/ResourceResolutionUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -106,15 +106,11 @@
          protected void setUp() throws Exception
          {
             super.setUp();
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
          }
 
           protected void tearDown() throws Exception
           {
              super.tearDown();
-             ClassLoader loader = Thread.currentThread().getContextClassLoader();
-             undeploy (loader.getResource("jbossmessaging/test-destinations-service.xml").toString());
           }
       };
    }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/ejb/OnCreateTimerMessageBean.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/ejb/OnCreateTimerMessageBean.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/ejb/OnCreateTimerMessageBean.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -207,7 +207,7 @@
             try
             {
                sender.close();
-               log.info("JBossMQ QueueSender Closed");
+               log.info("QueueSender Closed");
             }
             catch (JMSException e)
             {
@@ -219,7 +219,7 @@
             try
             {
                qs.close();
-               log.info("JBossMQ QueueSession Closed");
+               log.info("QueueSession Closed");
             }
             catch (JMSException e)
             {

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/test/BasicTimerUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/test/BasicTimerUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/timer/test/BasicTimerUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -44,6 +44,7 @@
 import junit.framework.Test;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.util.AppCallbackHandler;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.test.timer.interfaces.TimerEntity;
 import org.jboss.test.timer.interfaces.TimerEntityHome;
 import org.jboss.test.timer.interfaces.TimerSFSB;

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/util/jms/JMSDestinationsUtil.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/util/jms/JMSDestinationsUtil.java	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/util/jms/JMSDestinationsUtil.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,107 @@
+package org.jboss.test.util.jms;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.jms.JMSTestAdmin;
+import org.jboss.test.jms.TestRole;
+
+public class JMSDestinationsUtil
+{
+   
+   private static final Logger log = Logger.getLogger(JMSDestinationsUtil.class);
+   
+   
+   public static void deployQueue(String queueName) throws Exception
+   {
+      JMSTestAdmin admin = JMSTestAdmin.getAdmin();
+      admin.createQueue(queueName, new TestRole("guest", true, true, true));
+   }
+   
+   public static void deployTopic(String topicName) throws Exception
+   {
+      JMSTestAdmin admin = JMSTestAdmin.getAdmin();
+      admin.createTopic(topicName, new TestRole("guest", true, true, true));
+   }
+   
+   /**
+    * Historically at jboss, lots of tests will use these destinations since JBoss 3. 
+    * This method is a tool to create the basic setting that most tests will use.  
+    * @throws Exception
+    */
+   public static void setupBasicDestinations() throws Exception
+   {
+      JMSTestAdmin admin = JMSTestAdmin.getAdmin();
+      admin.createTopic("securedTopic", new TestRole[]{
+            new TestRole("publisher", true, true, false)});
+      admin.createTopic("testTopic", new TestRole[]{
+            new TestRole("guest", true, true, true),
+            new TestRole("publisher", true, true, true),
+            new TestRole("durpublisher", true, true, true)});
+      admin.createTopic("testDurableTopic", new TestRole[]{
+            new TestRole("guest", true, true, true),
+            new TestRole("publisher", true, true, true),
+            new TestRole("durpublisher", true, true, true)});
+
+      admin.createQueue("testQueue", new TestRole[]{
+            new TestRole("guest", true, true, true),
+            new TestRole("publisher", true, true, true),
+            new TestRole("durpublisher", true, true, true)});
+      
+      admin.createQueue("A", new TestRole("guest", true, true, true));
+      admin.createQueue("B", new TestRole("guest", true, true, true));
+      admin.createQueue("C", new TestRole("guest", true, true, true));
+      admin.createQueue("D", new TestRole("guest", true, true, true));
+      admin.createQueue("ex", new TestRole("guest", true, true, true));
+   }
+   
+   /** This will remove all destinations created during the test */
+   public static void destroyDestinations() throws Exception
+   {
+      JMSTestAdmin.getAdmin().destroyCreatedDestinations();
+   }
+   
+   public static void destroyEveryDestination() throws Exception
+   {
+      destroyDestinations();
+      JMSTestAdmin.getAdmin().destroyEveryDestination();
+   }
+   
+   
+   public static void purgeQueue(String jndi) throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      Connection conn = null;
+      try
+      {
+         Queue queue = (Queue)ctx.lookup(jndi);
+         ConnectionFactory cf = (javax.jms.ConnectionFactory)ctx.lookup("ConnectionFactory");
+         conn = cf.createConnection();
+         Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         conn.start();
+         MessageConsumer cons = sess.createConsumer(queue);
+         
+         while (cons.receiveNoWait() != null);
+         
+         
+      }
+      finally
+      {
+         ctx.close();
+         if (conn != null)
+         {
+            conn.close();
+         }
+      }
+   }
+
+
+   
+   
+
+}

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java	2010-05-05 00:45:32 UTC (rev 104459)
@@ -509,33 +509,12 @@
          protected void setUp() throws Exception
          {
             super.setUp();
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            deploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
             redeploy("jbosstest-web.ear");
             flushAuthCache("jbosstest-web");
          }
          protected void tearDown() throws Exception
          {
             undeploy("jbosstest-web.ear");
-
-            try
-            {
-               // Remove all the messages created during this test
-               getServer().invoke
-               (
-                  new ObjectName("jboss.mq.destination:service=Queue,name=testQueue"),
-                  "removeAllMessages",
-                  new Object[0],
-                  new String[0]
-               );
-            }
-            catch(Exception e)
-            {
-            }
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            undeploy(loader.getResource(
-                  "messaging/test-destinations-full-service.xml").toString());
             super.tearDown();
          
          }

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/cts/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/cts/META-INF/jboss.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/cts/META-INF/jboss.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -101,12 +101,10 @@
          <ejb-name>StrictlyPooledMDB</ejb-name>
          <destination-jndi-name>queue/A</destination-jndi-name>
          <configuration-name>Strictly Pooled Message Driven Bean</configuration-name>
-         <depends>jboss.mq.destination:service=Queue,name=A</depends>
       </message-driven>
       <message-driven>
          <ejb-name>SubclassMDB</ejb-name>
          <destination-jndi-name>queue/C</destination-jndi-name>
-         <depends>jboss.mq.destination:service=Queue,name=C</depends>
       </message-driven>
    </enterprise-beans>
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ee5client/ee5client-jms-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ee5client/ee5client-jms-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ee5client/ee5client-jms-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-   <mbean code="org.jboss.mq.server.jmx.Queue"
-      name="jboss.mq.destination:service=Queue,name=messageReplier">
-      <attribute name="JNDIName">queue/messageReplier</attribute>
-      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-   </mbean>
-</server>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+
+
+   <queue name="mdbtest">
+      <entry name="/queue/mdbtest"/>
+   </queue>
+
+</configuration>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/test-destinations-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/test-destinations-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/ejb3/jbas6239/test-destinations-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.mq.destination:service=Queue,name=mdbtest">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-</server>
\ No newline at end of file

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+
+   <topic name="testTopic">
+      <entry name="/topic/testTopic"/>
+   </topic>
+
+   <topic name="securedTopic">
+      <entry name="/topic/securedTopic"/>
+   </topic>
+
+   <topic name="testDurableTopic">
+      <entry name="/topic/testDurableTopic"/>
+   </topic>
+
+   <queue name="testQueue">
+      <entry name="/queue/testQueue"/>
+   </queue>
+
+   <queue name="A">
+      <entry name="/queue/A"/>
+   </queue>
+
+   <queue name="B">
+      <entry name="/queue/B"/>
+   </queue>
+
+   <queue name="C">
+      <entry name="/queue/C"/>
+   </queue>
+
+   <queue name="D">
+      <entry name="/queue/D"/>
+   </queue>
+
+   <queue name="ex">
+      <entry name="/queue/ex"/>
+   </queue>
+
+
+</configuration>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-queues.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-queues.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/hornetq/hornetq-queues.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,36 @@
+<configuration xmlns="urn:hornetq" 
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                        xsi:schemaLocation="urn:hornetq ../../../../src/schemas/hornetq-configuration.xsd ">
+
+   <security-settings>
+         <security-setting match="jms.topic.testTopic">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+         <security-setting match="jms.topic.securedTopic">
+             <permission type="send" roles="publisher"/>
+             <permission type="consume" roles="publisher"/>
+             <permission type="manage" roles="publisher"/>
+         </security-setting>
+         <security-setting match="jms.topic.testDurableTopic">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+         <security-setting match="jms.queue.testQueue">
+             <permission type="send" roles="guest,publisher"/>
+             <permission type="consume" roles="guest,publisher"/>
+             <permission type="manage" roles="guest,publisher"/>
+         </security-setting>
+   </security-settings>
+</configuration>
+

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/provider.properties
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/provider.properties	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/provider.properties	2010-05-05 00:45:32 UTC (rev 104459)
@@ -27,8 +27,6 @@
 # Uncomment the chosen provider and comment the other ones
 ##
 
-jms.provider.admin.class = org.jboss.test.jbossmessaging.JBossMessagingAdmin
+jms.provider.admin.class = org.jboss.test.jbossmessaging.test.joram.JoramTestAdminDelegate
 jms.provider.resources.dir = jbossmessaging
-#jms.provider.admin.class = org.jboss.test.jbossmq.JBossMQAdmin
-#jms.provider.resources.dir = jbossmq
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<server>
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueA"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueB"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueC"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueD"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueE"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=testDistributedQueueF"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-        </security>
-      </attribute>
-      <attribute name="Clustered">true</attribute>
-   </mbean>   
-
-
-</server>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-full-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<server>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=testTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="guest" read="true" write="true"/>
-            <role name="publisher" read="true" write="true" create="false"/>
-            <role name="durpublisher" read="true" write="true" create="true"/>
-         </security>
-      </attribute>
-   </mbean>
-  
-
-  <mbean code="org.jboss.jms.server.destination.TopicService"
-         name="jboss.messaging.destination:service=Topic,name=securedTopic"
-         xmbean-dd="xmdesc/Topic-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="publisher" read="true" write="true" create="false"/>
-        </security>
-     </attribute>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.TopicService"
-         name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
-         xmbean-dd="xmdesc/Topic-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-           <role name="publisher" read="true" write="true" create="false"/>
-           <role name="durpublisher" read="true" write="true" create="true"/>
-        </security>
-     </attribute>
-  </mbean>
-
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=testQueue"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-           <role name="publisher" read="true" write="true" create="false"/>
-           <role name="noacc" read="false" write="false" create="false"/>
-        </security>
-     </attribute>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=A"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=B"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=C"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends>jboss.messaging:service=PostOffice</depends>
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=D"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=ex"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-</server>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossmessaging/test-destinations-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<server>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-      name="jboss.messaging.destination:service=Topic,name=testTopic"
-      xmbean-dd="xmdesc/Topic-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <attribute name="SecurityConfig">
-         <security>
-            <role name="guest" read="true" write="true"/>
-            <role name="publisher" read="true" write="true" create="false"/>
-            <role name="durpublisher" read="true" write="true" create="true"/>
-         </security>
-      </attribute>
-   </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-         name="jboss.messaging.destination:service=Topic,name=securedTopic"
-         xmbean-dd="xmdesc/Topic-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="publisher" read="true" write="true" create="false"/>
-        </security>
-     </attribute>
-  </mbean>
-
-   <mbean code="org.jboss.jms.server.destination.TopicService"
-         name="jboss.messaging.destination:service=Topic,name=testDurableTopic"
-         xmbean-dd="xmdesc/Topic-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-           <role name="publisher" read="true" write="true" create="false"/>
-           <role name="durpublisher" read="true" write="true" create="true"/>
-        </security>
-     </attribute>
-  </mbean>
-
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-         name="jboss.messaging.destination:service=Queue,name=testQueue"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-     <attribute name="SecurityConfig">
-        <security>
-           <role name="guest" read="true" write="true"/>
-           <role name="publisher" read="true" write="true" create="false"/>
-           <role name="noacc" read="false" write="false" create="false"/>
-        </security>
-     </attribute>
-  </mbean>
-
-</server>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/resources/xa-mq-destinations-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/resources/xa-mq-destinations-service.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jbossts/resources/xa-mq-destinations-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+  <!-- RECOVERY destinations -->
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=recovery">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.messaging:service=SecurityStore</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Topic"
+	 name="jboss.mq.destination:service=Topic,name=recoveryTopic">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.messaging:service=SecurityStore</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Topic"
+	 name="jboss.mq.destination:service=Topic,name=recoveryDurableTopic">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.messaging:service=SecurityStore</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=recoveryQueue">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.messaging:service=SecurityStore</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+         name="jboss.mq.destination:service=Queue,name=rcvQ">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.messaging:service=SecurityStore</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+         name="jboss.mq.destination:service=Queue,name=sndQ">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+<!--
+    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+-->
+  </mbean>
+
+ 
+</server>
+

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jca/executejmsrollback/test-jms-local-ds.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jca/executejmsrollback/test-jms-local-ds.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/jca/executejmsrollback/test-jms-local-ds.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,7 +25,8 @@
   <tx-connection-factory>
     <jndi-name>TestJmsLocal</jndi-name>
     <rar-name>jms-ra.rar</rar-name>
-    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
+    <xa-transaction/>
+    <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
     <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
     <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/TestJMSLocalProvider</config-property>
     <max-pool-size>20</max-pool-size>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+   <queue name="myMDBQueue">
+      <entry name="/queue/myMDBQueue"/>
+      <entry name="anotherContext/QueueInADifferentContext"/>
+   </queue>
+
+
+
+   <topic name="myMDBTopic">
+      <entry name="/topic/myMDBTopic"/>
+      <entry name="anotherContext/TopicInADifferentContext"/>
+   </topic>
+
+</configuration>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-queues.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-queues.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/hornetq-queues.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,26 @@
+<configuration xmlns="urn:hornetq" 
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                        xsi:schemaLocation="urn:hornetq ../../../../src/schemas/hornetq-configuration.xsd ">
+
+   <security-settings>
+        <security-setting match="jms.queue.myMDBQueue">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+        <security-setting match="jms.topic.myMDTopic">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+   </security-settings>
+</configuration>
+

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/jboss-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/jboss-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdb/jboss-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE server>
-
-<server>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-	 name="jboss.mq.destination:service=Queue,name=myMDBQueue"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-    <depends>jboss.messaging:service=PostOffice</depends>
-    <attribute name="SecurityConfig">
-      <security>
-        <role name="guest" read="true" write="true"/>
-        <role name="publisher" read="true" write="true" create="false"/>
-        <role name="noacc" read="false" write="false" create="false"/>
-      </security>
-    </attribute>
-  </mbean>
-  <mbean code="org.jboss.jms.server.destination.TopicService"
-    name="jboss.messaging.destination:service=Topic,name=myMDBTopic"
-    xmbean-dd="xmdesc/Topic-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-    <depends>jboss.messaging:service=PostOffice</depends>
-    <attribute name="SecurityConfig">
-      <security>
-        <role name="guest" read="true" write="true"/>
-        <role name="publisher" read="true" write="true" create="false"/>
-        <role name="durpublisher" read="true" write="true" create="true"/>
-      </security>
-    </attribute>
-  </mbean>
-  <mbean code="org.jboss.naming.NamingAlias"
-         name="jboss.test:test=mdb,alias=anotherContext/QueueInADifferentContext">
-     <attribute name="FromName">anotherContext/QueueInADifferentContext</attribute>
-     <attribute name="ToName">queue/myMDBQueue</attribute>
-  </mbean>
-  <mbean code="org.jboss.naming.NamingAlias" 
-         name="jboss.test:test=mdb,alias=anotherContext/TopicInADifferentContext">
-     <attribute name="FromName">anotherContext/TopicInADifferentContext</attribute>
-     <attribute name="ToName">topic/myMDBTopic</attribute>
-  </mbean>
-</server>
\ No newline at end of file

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -16,7 +16,6 @@
                <invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>
             </invoker>
          </invoker-bindings>
-         <depends>jboss.messaging.destination:service=Queue,name=mdbsessionpoolclearQueue</depends>
       </message-driven>
    </enterprise-beans>
 

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-   
-  <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=mdbsessionpoolclearQueue" xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-    <depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-</server>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss-mdb-client-id.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss-mdb-client-id.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss-mdb-client-id.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,11 +21,10 @@
                <activation-config-property-name>subscriptionDurability</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.durability}</activation-config-property-value>
             </activation-config-property>
-            <!-- When not using preconfigured client ids
             <activation-config-property>
                <activation-config-property-name>clientID</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.clientID}</activation-config-property-value>
-            </activation-config-property-->
+            </activation-config-property>
             <activation-config-property>
                <activation-config-property-name>subscriptionName</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.subscriptionName}</activation-config-property-value>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -21,11 +21,10 @@
                <activation-config-property-name>subscriptionDurability</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.durability}</activation-config-property-value>
             </activation-config-property>
-            <!-- When not using preconfigured client ids
             <activation-config-property>
                <activation-config-property-name>clientID</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.clientID}</activation-config-property-value>
-            </activation-config-property-->
+            </activation-config-property>
             <activation-config-property>
                <activation-config-property-name>subscriptionName</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.subscriptionName}</activation-config-property-value>
@@ -38,10 +37,6 @@
                <activation-config-property-name>password</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.password}</activation-config-property-value>
             </activation-config-property>
-            <activation-config-property>
-               <activation-config-property-name>DLQMaxResent</activation-config-property-name>
-               <activation-config-property-value>${test.messagedriven.DLQMaxResent}</activation-config-property-value>
-            </activation-config-property>
          </activation-config>
          <invoker-bindings>
             <invoker>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/ejb-jar.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/ejb-jar.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/ejb-jar.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -25,11 +25,10 @@
                <activation-config-property-name>subscriptionDurability</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.durability}</activation-config-property-value>
             </activation-config-property>
-            <!-- When not using preconfigured client ids
             <activation-config-property>
                <activation-config-property-name>clientID</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.clientID}</activation-config-property-value>
-            </activation-config-property-->
+            </activation-config-property>
             <activation-config-property>
                <activation-config-property-name>subscriptionName</activation-config-property-name>
                <activation-config-property-value>${test.messagedriven.subscriptionName}</activation-config-property-value>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+
+   <topic name="testTopic">
+      <entry name="/topic/testTopic"/>
+   </topic>
+
+   <topic name="securedTopic">
+      <entry name="/topic/securedTopic"/>
+   </topic>
+
+   <topic name="testDurableTopic">
+      <entry name="/topic/testDurableTopic"/>
+   </topic>
+
+   <queue name="testQueue">
+      <entry name="/queue/testQueue"/>
+   </queue>
+
+   <queue name="A">
+      <entry name="/queue/A"/>
+   </queue>
+
+   <queue name="B">
+      <entry name="/queue/B"/>
+   </queue>
+
+   <queue name="C">
+      <entry name="/queue/C"/>
+   </queue>
+
+   <queue name="D">
+      <entry name="/queue/D"/>
+   </queue>
+
+   <queue name="ex">
+      <entry name="/queue/ex"/>
+   </queue>
+
+
+</configuration>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-queues.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-queues.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/messagedriven/jmscontainerinvoker/META-INF/hornetq-queues.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,54 @@
+<configuration xmlns="urn:hornetq" 
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                        xsi:schemaLocation="urn:hornetq ../../../../src/schemas/hornetq-configuration.xsd ">
+
+   <address-settings>
+      <!--default for catch all-->
+      <address-setting match="jms.queue.*">
+         <max-delivery-attempts>5</max-delivery-attempts>
+         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+         <redelivery-delay>0</redelivery-delay>
+         <max-size-bytes>-1</max-size-bytes>
+      </address-setting>
+      <address-setting match="jms.topic.*">
+         <max-delivery-attempts>${test.messagedriven.DLQMaxResent}</max-delivery-attempts>
+         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+         <redelivery-delay>0</redelivery-delay>
+         <max-size-bytes>-1</max-size-bytes>
+      </address-setting>
+   </address-settings>
+
+   <security-settings>
+         <security-setting match="jms.topic.testTopic">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+         <security-setting match="jms.topic.securedTopic">
+             <permission type="send" roles="publisher"/>
+             <permission type="consume" roles="publisher"/>
+             <permission type="manage" roles="publisher"/>
+         </security-setting>
+         <security-setting match="jms.topic.testDurableTopic">
+             <permission type="send" roles="guest,publisher,durpublisher"/>
+             <permission type="consume" roles="guest,publisher,durpublisher"/>
+             <permission type="createDurableQueue" roles="guest,durpublisher"/>
+             <permission type="deleteDurableQueue" roles="guest,durpublisher"/>
+             <permission type="createTempQueue" roles="guest,durpublisher"/>
+             <permission type="deleteTempQueue" roles="guest,durpublisher"/>
+             <permission type="manage" roles="guest,publisher,durpublisher"/>
+         </security-setting>
+         <security-setting match="jms.queue.testQueue">
+             <permission type="send" roles="guest,publisher"/>
+             <permission type="consume" roles="guest,publisher"/>
+             <permission type="manage" roles="guest,publisher"/>
+         </security-setting>
+   </security-settings>
+</configuration>
+

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+
+
+   <queue name="QueueA">
+      <entry name="/queue/QueueA"/>
+   </queue>
+
+   <queue name="QueueB">
+      <entry name="/queue/QueueB"/>
+   </queue>
+
+   <queue name="QueueC">
+      <entry name="/queue/QueueC"/>
+   </queue>
+
+   <queue name="QueueD">
+      <entry name="/queue/QueueD"/>
+   </queue>
+
+</configuration>

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/jboss-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/jboss-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/security-spec/service-inf/jboss-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -31,25 +31,4 @@
       <depends optional-attribute-name="ManagerServiceName">jboss.security:service=JaasSecurityManager</depends>
    </mbean>
 
-   <!-- Create the test queues -->
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-	 name="jboss.mq.destination:service=Queue,name=QueueA"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-	 name="jboss.mq.destination:service=Queue,name=QueueB"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-	 name="jboss.mq.destination:service=Queue,name=QueueC"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-	 name="jboss.mq.destination:service=Queue,name=QueueD"
-         xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-  </mbean>
 </server>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-roles.properties
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-roles.properties	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-roles.properties	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,5 @@
+#
+# user=role1,role2,...
+#
+guest=guest
+john=durable,guest

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-users.properties
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-users.properties	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/conf/hornetq-users.properties	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,5 @@
+#
+# user=password
+#
+guest=guest
+john=needle
\ No newline at end of file

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-configuration.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-configuration.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-configuration.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,71 @@
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+   <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+   <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+   <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+   <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+   <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+   <connectors>
+      <connector name="netty">
+         <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </connector>
+
+      <connector name="in-vm">
+         <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      </connector>
+
+   </connectors>
+
+   <acceptors>
+      <acceptor name="netty">
+         <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </acceptor>
+
+      <acceptor name="in-vm">
+        <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+        <param key="server-id" value="0"/>
+      </acceptor>
+
+   </acceptors>
+
+   <security-settings>
+      <security-setting match="#">
+         <permission type="createTempQueue" roles="guest"/>
+         <permission type="deleteTempQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+      <security-setting match="jms.topic.testTopic">
+         <permission type="createTempQueue" roles="durable"/>
+         <permission type="deleteTempQueue" roles="durable"/>
+         <permission type="createDurableQueue" roles="durable"/>
+         <permission type="deleteDurableQueue" roles="durable"/>
+         <permission type="consume" roles="durable"/>
+         <permission type="send" roles="durable"/>
+      </security-setting>
+   </security-settings>
+
+   <address-settings>
+      <!--default for catch all-->
+      <address-setting match="#">
+         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+         <redelivery-delay>0</redelivery-delay>
+         <max-size-bytes>-1</max-size-bytes>
+         <page-size-bytes>10485760</page-size-bytes>
+         <message-counter-history-day-limit>10</message-counter-history-day-limit>
+      </address-setting>
+   </address-settings>
+
+</configuration>

Added: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-jms.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-jms.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/test-configs/hornetq/deploy/hornetq.sar/hornetq-jms.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -0,0 +1,45 @@
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+   <connection-factory name="NettyConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="netty"/>
+      </connectors>
+      <entries>
+         <entry name="/ConnectionFactory"/>
+         <entry name="/XAConnectionFactory"/>
+      </entries>
+      <block-on-non-durable-send>true</block-on-non-durable-send>
+   </connection-factory>
+
+   <connection-factory name="PreconfClientIDConnectionfactory">
+      <connectors>
+         <connector-ref connector-name="netty"/>
+      </connectors>
+      <entries>
+         <entry name="/PreconfClientIDConnectionfactory"/>
+      </entries>
+      <block-on-non-durable-send>true</block-on-non-durable-send>
+      <client-id>DurableSubscriberExample</client-id>
+   </connection-factory>
+
+   <connection-factory name="InVMConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="in-vm"/>
+      </connectors>
+      <entries>
+         <entry name="java:/ConnectionFactory"/>
+         <entry name="java:/XAConnectionFactory"/>
+      </entries>
+   </connection-factory>
+
+   <queue name="DLQ">
+      <entry name="/queue/DLQ"/>
+   </queue>
+
+   <queue name="ExpiryQueue">
+      <entry name="/queue/ExpiryQueue"/>
+   </queue>
+
+</configuration>
\ No newline at end of file

Modified: branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/timer/service/jboss-service.xml
===================================================================
--- branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/timer/service/jboss-service.xml	2010-05-04 22:00:30 UTC (rev 104458)
+++ branches/JBPAPP_5_1_hornetq-int/testsuite/src/resources/timer/service/jboss-service.xml	2010-05-05 00:45:32 UTC (rev 104459)
@@ -17,21 +17,4 @@
    </mbean>
 
   <!-- Define the standard queues -->
-  
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.mq.destination:service=Queue,name=QueueA">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.mq.destination:service=Queue,name=QueueB">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.mq.destination:service=Queue,name=QueueC">
-     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.mq.destination:service=Queue,name=QueueD">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
 </server>




More information about the jboss-cvs-commits mailing list