[jboss-cvs] JBossAS SVN: r72251 - in trunk: build and 16 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 15 20:38:50 EDT 2008


Author: clebert.suconic at jboss.com
Date: 2008-04-15 20:38:50 -0400 (Tue, 15 Apr 2008)
New Revision: 72251

Added:
   trunk/messaging/src/etc/deploy/common/destinations-service.xml
   trunk/messaging/src/etc/deploy/common/jms-ds.xml
   trunk/testsuite/imports/sections/jbossmessaging-cluster.xml
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTest.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTestContainer.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillService.java
   trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillServiceMBean.java
   trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/
   trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/jboss-service.xml
   trunk/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml
   trunk/testsuite/src/resources/test-configs/jbm-cluster1/
   trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/
   trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/hsqldb-ds.xml
   trunk/testsuite/src/resources/test-configs/jbm-cluster2/
   trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/
   trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/hsqldb-ds.xml
Removed:
   trunk/messaging/src/etc/deploy/clustered/connection-factories-service.xml
   trunk/messaging/src/etc/deploy/clustered/destinations-service.xml
   trunk/messaging/src/etc/deploy/clustered/hsqldb-persistence-service.xml
   trunk/messaging/src/etc/deploy/clustered/jms-ds.xml
   trunk/messaging/src/etc/deploy/common/remoting-service.xml
   trunk/messaging/src/etc/deploy/non-clustered/connection-factories-service.xml
   trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml
   trunk/messaging/src/etc/deploy/non-clustered/hsqldb-persistence-service.xml
   trunk/messaging/src/etc/deploy/non-clustered/jms-ds.xml
Modified:
   trunk/aspects/.classpath
   trunk/build/build-distr.xml
   trunk/testsuite/build.xml
   trunk/testsuite/imports/server-config.xml
   trunk/testsuite/imports/test-jars.xml
Log:
JBAS-5295 - upgrade JBM to CR1 and JBAS-4946 - clustered testcases for JBM

Modified: trunk/aspects/.classpath
===================================================================
--- trunk/aspects/.classpath	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/aspects/.classpath	2008-04-16 00:38:50 UTC (rev 72251)
@@ -32,7 +32,7 @@
 	<classpathentry exported="true" kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar" sourcepath="/extra/work-clebert/workspaces/jtest/jboss-test/src"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/jboss/aop/lib/pluggable-instrumentor.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/org/jboss/aspects/lib/jboss-remoting-aspects.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/org/jboss/aspects/lib/jboss-security-aspects.jar"/>

Modified: trunk/build/build-distr.xml
===================================================================
--- trunk/build/build-distr.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/build/build-distr.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -721,51 +721,38 @@
 
 
      <!--
-          This would be the "clustered" configuration. However, because we have a dependency on
-          MySQL, we're actually not deploying a 'true' clustered configurtion just yet ...
+        Clustered Config, using HSQLDB (but not supposed to go into production mode, since clustering requires a shared DB)
      -->
-     <!--
-     <copy todir="${install.all.deploy}" file="${_module.output}/etc/deploy/clustered/jms-ds.xml"/>
      <mkdir dir="${install.all.deploy}/messaging"/>
+ 	 <copy tofile="${install.all.deploy}/messaging/hsqldb-persistence-service.xml" file="${jboss.messaging.resources}/clustered-hsqldb-persistence-service.xml"/>
      <copy todir="${install.all.deploy}/messaging">
         <fileset dir="${_module.output}/etc/deploy/common">
            <include name="*-service.xml"/>
+            <include name="*-beans.xml"/>
+            <include name="jms-ds.xml"/>
+            <include name="destinations-service.xml"/>
         </fileset>
-        <fileset dir="${_module.output}/etc/deploy/clustered">
-           <include name="*-service.xml"/>
-           <include name="*-beans.xml"/>
-           <include name="mysql-ds.xml"/>
+        <fileset dir="${jboss.messaging.resources}/">
+            <include name="connection-factories-service.xml"/>
+            <include name="remoting-bisocket-service.xml"/>
         </fileset>
      </copy>
-     -->
+  	
 
      <!--
-         ... but we deploy a configuration identical to a "non-clustered" one.
+          Default configuration
      -->
-     <copy todir="${install.all.deploy}" file="${_module.output}/etc/deploy/clustered/jms-ds.xml"/>
-     <mkdir dir="${install.all.deploy}/messaging"/>
-     <copy todir="${install.all.deploy}/messaging">
-        <fileset dir="${_module.output}/etc/deploy/common">
-           <include name="*-service.xml"/>
-           <include name="*-beans.xml"/>
-        </fileset>
-        <fileset dir="${_module.output}/etc/deploy/clustered">
-           <include name="*-service.xml"/>
-        </fileset>
-     </copy>
-
-     <!--
-          This is a non-clustered configuration.
-     -->
-     <copy todir="${install.default.deploy}" file="${_module.output}/etc/deploy/non-clustered/jms-ds.xml"/>
      <mkdir dir="${install.default.deploy}/messaging"/>
      <copy todir="${install.default.deploy}/messaging">
         <fileset dir="${_module.output}/etc/deploy/common">
            <include name="*-service.xml"/>
            <include name="*-beans.xml"/>
+            <include name="jms-ds.xml"/>
         </fileset>
-        <fileset dir="${_module.output}/etc/deploy/non-clustered">
-           <include name="*-service.xml"/>
+        <fileset dir="${jboss.messaging.resources}/">
+            <include name="connection-factories-service.xml"/>
+            <include name="hsqldb-persistence-service.xml"/>
+            <include name="remoting-bisocket-service.xml"/>
         </fileset>
      </copy>
 

Deleted: trunk/messaging/src/etc/deploy/clustered/connection-factories-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/clustered/connection-factories-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/clustered/connection-factories-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Messaging Connection Factories deployment descriptor.
-
-     $Id$
- -->
-
-<server>
-
-   <!-- The default connection factory does not support automatic failover or load balancing-
-        this is so we can maintain compatiblity with applications written for JBoss MQ which use this
-        connection factory.
-   -->     
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-
-      <attribute name="JNDIBindings">
-         <bindings>
-            <binding>/ConnectionFactory</binding>
-            <binding>/XAConnectionFactory</binding>
-            <binding>java:/ConnectionFactory</binding>
-            <binding>java:/XAConnectionFactory</binding>
-         </bindings>
-      </attribute>
-   </mbean>
-
-   <!-- A clustered connection factory that supports automatic failover and load balancing of created
-        connections.
-        This factory is not suitable to be used by MDBs.
-   -->
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ClusteredConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-
-      <attribute name="JNDIBindings">
-         <bindings>
-            <binding>/ClusteredConnectionFactory</binding>
-            <binding>/ClusteredXAConnectionFactory</binding>
-            <binding>java:/ClusteredConnectionFactory</binding>
-            <binding>java:/ClusteredXAConnectionFactory</binding>
-         </bindings>
-      </attribute>
-
-      <attribute name="SupportsFailover">true</attribute>
-      <attribute name="SupportsLoadBalancing">true</attribute>      
-   </mbean>
-   
-   <!-- A connection factory with no JNDI bindings that is used in clustering to create the connections that
-        pull messages from one node to another
-   -->
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SupportsFailover">false</attribute>
-      <attribute name="SupportsLoadBalancing">false</attribute>      
-   </mbean>
-   
-   <!-- An example connection factory with all attributes shown 
-   
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=MyExampleConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      
-      <constructor>
-      
-         <!- - You can specify the default Client ID to use for connections created using this factory - -> 
-         
-         <arg type="java.lang.String" value="MyClientID"/>
-         
-      </constructor>
-      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      
-      <!- - The transport to use - can be bisocket, sslbisocket or http - ->
-      
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
-      
-      <depends>jboss.messaging:service=PostOffice</depends>
-      
-      <!- - PrefetchSize determines the approximate maximum number of messages the client consumer will buffer locally - ->
-      
-      <attribute name="PrefetchSize">150</attribute>
-      
-      <!- - Paging params to be used for temporary queues - ->
-      
-      <attribute name="DefaultTempQueueFullSize">200000</attribute>
-      
-      <attribute name="DefaultTempQueuePageSizeSize">2000</attribute>
-      
-      <attribute name="DefaultTempQueueDownCacheSize">2000</attribute>
-      
-      <!- - The batch size to use when using the DUPS_OK_ACKNOWLEDGE acknowledgement mode - ->
-      
-      <attribute name="DupsOKBatchSize">5000</attribute>
-      
-      <!- - Does this connection factory support automatic failover? - ->
-      
-      <attribute name="SupportsFailover">false</attribute>
-      
-      <!- - Does this connection factory support automatic client side load balancing? - ->
-      
-      <attribute name="SupportsLoadBalancing">false</attribute>  
-            
-      <!- - The class name of the factory used to create the load balancing policy to use on the client side - ->
-      
-      <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>  
-
-      <!- - Whether we should be strict TCK compliant, i.e. how we deal with foreign messages, defaults to false- ->
-
-      <attribute name="StrictTck">false</attribute>
-      
-      <!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
-      
-      <attribute name="DisableRemotingChecks">false</attribute>
-
-      <!- - The connection factory will be bound in the following places in JNDI - ->
-
-      <attribute name="JNDIBindings">
-      
-         <bindings>
-         
-            <binding>/acme/MyExampleConnectionFactory</binding>
-            
-            <binding>/acme/MyExampleConnectionFactoryDupe</binding>
-            
-            <binding>java:/xyz/CF1</binding>
-            
-            <binding>java:/connectionfactories/acme/connection_factory</binding>
-            
-         </bindings>
-         
-      </attribute>   
-       
-   </mbean>
-   
-   -->
-
-</server>
\ No newline at end of file

Deleted: trunk/messaging/src/etc/deploy/clustered/destinations-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/clustered/destinations-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/clustered/destinations-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Messaging Destinations deployment descriptor.
-
-     $Id$
- -->
-
-<server>
-
-   <!--
-      The Default Dead Letter Queue. This destination is a dependency of an EJB MDB container.
-   -->
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=DLQ"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-   
-   <!--
-      The Default Expiry Queue.
-   -->
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=ExpiryQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>   
-
-
-</server>
\ No newline at end of file

Deleted: trunk/messaging/src/etc/deploy/clustered/hsqldb-persistence-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/clustered/hsqldb-persistence-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/clustered/hsqldb-persistence-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Hypersonic persistence deployment descriptor.
-     
-     DO NOT USE HYPERSONIC IN PRODUCTION or in a clustered environment- Hypersonic does not have transaction isolation
-
-     $Id$
- -->
-
-<server>
-
-   <!-- Persistence Manager MBean configuration
-       ======================================= -->
-   
-   <mbean code="org.jboss.messaging.core.jmx.JDBCPersistenceManagerService"
-      name="jboss.messaging:service=PersistenceManager"
-      xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-            
-      <!-- The datasource to use for the persistence manager -->
-                                
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <!-- If true will attempt to create tables and indexes on every start-up -->
-                  
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <!-- If true then will use JDBC batch updates -->
-                 
-      <attribute name="UsingBatchUpdates">false</attribute>
-      
-      <!-- The maximum number of parameters to include in a prepared statement -->            
-      
-      <attribute name="MaxParams">500</attribute>
-   </mbean>
-
-   <!-- Messaging Post Office MBean configuration
-        ========================================= -->
-   
-   <mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService"
-      name="jboss.messaging:service=PostOffice"      
-      xmbean-dd="xmdesc/MessagingPostOffice-xmbean.xml">
-            
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      
-      <!-- The name of the post office -->      
-                 
-      <attribute name="PostOfficeName">JMS post office</attribute>
-      
-      <!-- The datasource used by the post office to access it's binding information -->                       
-      
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <!-- If true will attempt to create tables and indexes on every start-up -->
-                        
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <!-- We don't advice using HSQLDB in production, mainly on this clustered config. -->
-      
-      <attribute name="Clustered">true</attribute>
-      
-      <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
-      <attribute name="ControlChannelName">jbm-control</attribute>
-      <attribute name="DataChannelName">jbm-data</attribute>
-      <attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
-      
-   </mbean>
-
-   <!-- Messaging JMS User Manager MBean config
-        ======================================= -->
-   
-   <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
-      name="jboss.messaging:service=JMSUserManager"
-      xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <attribute name="SqlProperties"><![CDATA[
-POPULATE.TABLES.1  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('guest', 'guest')
-POPULATE.TABLES.2  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('j2ee', 'j2ee')
-POPULATE.TABLES.3  = INSERT INTO JBM_USER (USER_ID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
-POPULATE.TABLES.4  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('nobody', 'nobody')
-POPULATE.TABLES.5  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('dynsub', 'dynsub')
-POPULATE.TABLES.6  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('guest','guest')
-POPULATE.TABLES.7  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('j2ee','guest')
-POPULATE.TABLES.8  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('john','guest')
-POPULATE.TABLES.9  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('subscriber','john')
-POPULATE.TABLES.10 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','john')
-POPULATE.TABLES.11 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','dynsub')
-POPULATE.TABLES.12 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','john')
-POPULATE.TABLES.13 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','dynsub')
-POPULATE.TABLES.14 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('noacc','nobody')
-      ]]></attribute>
-   </mbean>
-
-</server>

Deleted: trunk/messaging/src/etc/deploy/clustered/jms-ds.xml
===================================================================
--- trunk/messaging/src/etc/deploy/clustered/jms-ds.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/clustered/jms-ds.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connection-factories>
-
-  <!-- ==================================================================== -->
-  <!-- JMS Stuff                                                            -->
-  <!-- ==================================================================== -->
-
-   <!--
-       The JMS provider loader. Currently pointing to a non-clustered ConnectionFactory. Need to
-       be replaced with a clustered non-load-balanced ConnectionFactory when it becomes available.
-       See http://jira.jboss.org/jira/browse/JBMESSAGING-843. 
-   -->
-   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
-          name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
-      <attribute name="ProviderName">DefaultJMSProvider</attribute>
-      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
-      <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
-      <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
-      <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
-   </mbean>
-
-   <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
-   <tx-connection-factory>
-      <jndi-name>JmsXA</jndi-name>
-      <xa-transaction/>
-      <rar-name>jms-ra.rar</rar-name>
-      <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
-      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
-      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
-      <max-pool-size>20</max-pool-size>
-      <security-domain-and-application>JmsXARealm</security-domain-and-application>
-      <depends>jboss.messaging:service=ServerPeer</depends>
-   </tx-connection-factory>
-
-</connection-factories>

Copied: trunk/messaging/src/etc/deploy/common/destinations-service.xml (from rev 72199, trunk/messaging/src/etc/deploy/clustered/destinations-service.xml)
===================================================================
--- trunk/messaging/src/etc/deploy/common/destinations-service.xml	                        (rev 0)
+++ trunk/messaging/src/etc/deploy/common/destinations-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+     Messaging Destinations deployment descriptor.
+
+     $Id$
+ -->
+
+<server>
+
+   <!--
+      The Default Dead Letter Queue. This destination is a dependency of an EJB MDB container.
+   -->
+
+   <mbean code="org.jboss.jms.server.destination.QueueService"
+      name="jboss.messaging.destination:service=Queue,name=DLQ"
+      xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
+      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
+   </mbean>
+   
+   <!--
+      The Default Expiry Queue.
+   -->
+
+   <mbean code="org.jboss.jms.server.destination.QueueService"
+      name="jboss.messaging.destination:service=Queue,name=ExpiryQueue"
+      xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
+      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
+   </mbean>   
+
+
+</server>
\ No newline at end of file

Copied: trunk/messaging/src/etc/deploy/common/jms-ds.xml (from rev 72199, trunk/messaging/src/etc/deploy/clustered/jms-ds.xml)
===================================================================
--- trunk/messaging/src/etc/deploy/common/jms-ds.xml	                        (rev 0)
+++ trunk/messaging/src/etc/deploy/common/jms-ds.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connection-factories>
+
+  <!-- ==================================================================== -->
+  <!-- JMS Stuff                                                            -->
+  <!-- ==================================================================== -->
+
+   <!--
+       The JMS provider loader. Currently pointing to a non-clustered ConnectionFactory. Need to
+       be replaced with a clustered non-load-balanced ConnectionFactory when it becomes available.
+       See http://jira.jboss.org/jira/browse/JBMESSAGING-843. 
+   -->
+   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
+          name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
+      <attribute name="ProviderName">DefaultJMSProvider</attribute>
+      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+      <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+   </mbean>
+
+   <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
+   <tx-connection-factory>
+      <jndi-name>JmsXA</jndi-name>
+      <xa-transaction/>
+      <rar-name>jms-ra.rar</rar-name>
+      <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
+      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+      <max-pool-size>20</max-pool-size>
+      <security-domain-and-application>JmsXARealm</security-domain-and-application>
+      <depends>jboss.messaging:service=ServerPeer</depends>
+   </tx-connection-factory>
+
+</connection-factories>

Deleted: trunk/messaging/src/etc/deploy/common/remoting-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/common/remoting-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/common/remoting-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Standard bisocket-based Remoting service deployment descriptor.
-
-     $Id: remoting-bisocket-service.xml 3409 2007-12-04 21:32:54Z timfox $
- -->
-
-<server>
-
-   <!-- Standard bisocket connector - the bisocket transport only opens connection from client->server
-        so can be used with firewalls where only outgoing connections are allowed.
-        For examples of HTTP and SSL transports see docs/examples -->
-   <mbean code="org.jboss.remoting.transport.Connector"
-          name="jboss.messaging:service=Connector,transport=bisocket"
-          display-name="Bisocket Transport Connector">
-      <attribute name="Configuration">
-         <config>
-            <invoker transport="bisocket">
-            
-               <!-- There should be no reason to change these parameters - warning!
-                    Changing them may stop JBoss Messaging working correctly -->            
-               <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
-               <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
-               <attribute name="dataType" isParam="true">jms</attribute>
-               <attribute name="socket.check_connection" isParam="true">false</attribute>
-               <attribute name="timeout" isParam="true">0</attribute>
-               <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
-               <attribute name="serverBindPort">4457</attribute>
-               <attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
-               <attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
-               <attribute name="numberOfCallRetries" isParam="true">1</attribute>
-               <attribute name="pingFrequency" isParam="true">214748364</attribute>
-               <attribute name="pingWindowFactor" isParam="true">10</attribute>
-               <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
-               <!-- End immutable parameters -->
-               
-               <!-- Periodicity of client pings. Server window by default is twice this figure -->                               
-               <attribute name="clientLeasePeriod" isParam="true">10000</attribute>
-
-               <!-- Number of seconds to wait for a connection in the client pool to become free -->
-               <attribute name="numberOfRetries" isParam="true">10</attribute>
-
-               <!-- Max Number of connections in client pool. This should be significantly higher than
-                    the max number of sessions/consumers you expect -->
-               <attribute name="JBM_clientMaxPoolSize" isParam="true">200</attribute>
-               
-               <!-- Use these parameters to specify values for binding and connecting control connections to 
-                    work with your firewall/NAT configuration
-               <attribute name="secondaryBindPort">xyz</attribute>                           
-               <attribute name="secondaryConnectPort">abc</attribute>               
-               -->
-                          
-            </invoker>
-            <handlers>
-               <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
-            </handlers>
-         </config>
-      </attribute>
-   </mbean>
-
-</server>

Deleted: trunk/messaging/src/etc/deploy/non-clustered/connection-factories-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/non-clustered/connection-factories-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/non-clustered/connection-factories-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Messaging Connection Factories deployment descriptor.
-
-     $Id: connection-factories-service.xml 3201 2007-10-19 10:39:50Z timfox $
- -->
-
-<server>
-
-   <!-- The default connection factory does not support automatic failover or load balancing-
-        this is so we can maintain compatiblity with applications written for JBoss MQ which use this
-        connection factory.
-   -->     
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-
-      <attribute name="JNDIBindings">
-         <bindings>
-            <binding>/ConnectionFactory</binding>
-            <binding>/XAConnectionFactory</binding>
-            <binding>java:/ConnectionFactory</binding>
-            <binding>java:/XAConnectionFactory</binding>
-         </bindings>
-      </attribute>
-   </mbean>
-
-   <!-- A clustered connection factory that supports automatic failover and load balancing of created
-        connections.
-        This factory is not suitable to be used by MDBs.
-   -->
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ClusteredConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-
-      <attribute name="JNDIBindings">
-         <bindings>
-            <binding>/ClusteredConnectionFactory</binding>
-            <binding>/ClusteredXAConnectionFactory</binding>
-            <binding>java:/ClusteredConnectionFactory</binding>
-            <binding>java:/ClusteredXAConnectionFactory</binding>
-         </bindings>
-      </attribute>
-
-      <attribute name="SupportsFailover">true</attribute>
-      <attribute name="SupportsLoadBalancing">true</attribute>      
-   </mbean>
-   
-   <!-- A connection factory with no JNDI bindings that is used in clustering to create the connections that
-        pull messages from one node to another
-   -->
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-      <attribute name="SupportsFailover">false</attribute>
-      <attribute name="SupportsLoadBalancing">false</attribute>      
-   </mbean>
-   
-   <!-- An example connection factory with all attributes shown 
-   
-   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
-      name="jboss.messaging.connectionfactory:service=MyExampleConnectionFactory"
-      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-      
-      <constructor>
-      
-         <!- - You can specify the default Client ID to use for connections created using this factory - -> 
-         
-         <arg type="java.lang.String" value="MyClientID"/>
-         
-      </constructor>
-      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      
-      <!- - The transport to use - can be bisocket, sslbisocket or http - ->
-      
-      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
-      
-      <depends>jboss.messaging:service=PostOffice</depends>
-      
-      <!- - PrefetchSize determines the approximate maximum number of messages the client consumer will buffer locally - ->
-      
-      <attribute name="PrefetchSize">150</attribute>
-      
-      <!- - Paging params to be used for temporary queues - ->
-      
-      <attribute name="DefaultTempQueueFullSize">200000</attribute>
-      
-      <attribute name="DefaultTempQueuePageSizeSize">2000</attribute>
-      
-      <attribute name="DefaultTempQueueDownCacheSize">2000</attribute>
-      
-      <!- - The batch size to use when using the DUPS_OK_ACKNOWLEDGE acknowledgement mode - ->
-      
-      <attribute name="DupsOKBatchSize">5000</attribute>
-      
-      <!- - Does this connection factory support automatic failover? - ->
-      
-      <attribute name="SupportsFailover">false</attribute>
-      
-      <!- - Does this connection factory support automatic client side load balancing? - ->
-      
-      <attribute name="SupportsLoadBalancing">false</attribute>  
-            
-      <!- - The class name of the factory used to create the load balancing policy to use on the client side - ->
-      
-      <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>  
-
-      <!- - Whether we should be strict TCK compliant, i.e. how we deal with foreign messages, defaults to false- ->
-
-      <attribute name="StrictTck">false</attribute>
-      
-      <!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
-      
-      <attribute name="DisableRemotingChecks">false</attribute>
-
-      <!- - The connection factory will be bound in the following places in JNDI - ->
-
-      <attribute name="JNDIBindings">
-      
-         <bindings>
-         
-            <binding>/acme/MyExampleConnectionFactory</binding>
-            
-            <binding>/acme/MyExampleConnectionFactoryDupe</binding>
-            
-            <binding>java:/xyz/CF1</binding>
-            
-            <binding>java:/connectionfactories/acme/connection_factory</binding>
-            
-         </bindings>
-         
-      </attribute>   
-       
-   </mbean>
-   
-   -->
-
-</server>
\ No newline at end of file

Deleted: trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/non-clustered/destinations-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Messaging Destinations deployment descriptor.
-
-     $Id: destinations-service.xml 64130 2007-07-18 23:21:27Z clebert.suconic at jboss.com $
- -->
-
-<server>
-
-   <!--
-      The Default Dead Letter Queue. This destination is a dependency of an EJB MDB container.
-   -->
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=DLQ"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-   
-   <!--
-      The Default Expiry Queue.
-   -->
-
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.messaging.destination:service=Queue,name=ExpiryQueue"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>      
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>   
-
-
-</server>
\ No newline at end of file

Deleted: trunk/messaging/src/etc/deploy/non-clustered/hsqldb-persistence-service.xml
===================================================================
--- trunk/messaging/src/etc/deploy/non-clustered/hsqldb-persistence-service.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/non-clustered/hsqldb-persistence-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-     Hypersonic persistence deployment descriptor.
-     
-     DO NOT USE HYPERSONIC IN PRODUCTION or in a clustered environment- Hypersonic does not have transaction isolation
-
-     $Id: hsqldb-persistence-service.xml 3339 2007-11-16 20:48:08Z clebert.suconic at jboss.com $
- -->
-
-<server>
-
-   <!-- Persistence Manager MBean configuration
-       ======================================= -->
-   
-   <mbean code="org.jboss.messaging.core.jmx.JDBCPersistenceManagerService"
-      name="jboss.messaging:service=PersistenceManager"
-      xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-            
-      <!-- The datasource to use for the persistence manager -->
-                                
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <!-- If true will attempt to create tables and indexes on every start-up -->
-                  
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <!-- If true then will use JDBC batch updates -->
-                 
-      <attribute name="UsingBatchUpdates">false</attribute>
-      
-      <!-- The maximum number of parameters to include in a prepared statement -->            
-      
-      <attribute name="MaxParams">500</attribute>
-   </mbean>
-
-   <!-- Messaging Post Office MBean configuration
-        ========================================= -->
-   
-   <mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService"
-      name="jboss.messaging:service=PostOffice"      
-      xmbean-dd="xmdesc/MessagingPostOffice-xmbean.xml">
-            
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      
-      <!-- The name of the post office -->      
-                 
-      <attribute name="PostOfficeName">JMS post office</attribute>
-      
-      <!-- The datasource used by the post office to access it's binding information -->                       
-      
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <!-- If true will attempt to create tables and indexes on every start-up -->
-                        
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <!-- This post office is NON CLUSTERED - do not use clustering with Hypersonic!! -->
-      
-      <attribute name="Clustered">false</attribute>
-   </mbean>
-
-   <!-- Messaging JMS User Manager MBean config
-        ======================================= -->
-   
-   <mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
-      name="jboss.messaging:service=JMSUserManager"
-      xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
-      
-      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
-      
-      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
-      
-      <attribute name="DataSource">java:/DefaultDS</attribute>
-      
-      <attribute name="CreateTablesOnStartup">true</attribute>
-      
-      <attribute name="SqlProperties"><![CDATA[
-POPULATE.TABLES.1  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('guest', 'guest')
-POPULATE.TABLES.2  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('j2ee', 'j2ee')
-POPULATE.TABLES.3  = INSERT INTO JBM_USER (USER_ID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
-POPULATE.TABLES.4  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('nobody', 'nobody')
-POPULATE.TABLES.5  = INSERT INTO JBM_USER (USER_ID, PASSWD) VALUES ('dynsub', 'dynsub')
-POPULATE.TABLES.6  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('guest','guest')
-POPULATE.TABLES.7  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('j2ee','guest')
-POPULATE.TABLES.8  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('john','guest')
-POPULATE.TABLES.9  = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('subscriber','john')
-POPULATE.TABLES.10 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','john')
-POPULATE.TABLES.11 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('publisher','dynsub')
-POPULATE.TABLES.12 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','john')
-POPULATE.TABLES.13 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('durpublisher','dynsub')
-POPULATE.TABLES.14 = INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('noacc','nobody')
-      ]]></attribute>
-   </mbean>
-
-</server>
\ No newline at end of file

Deleted: trunk/messaging/src/etc/deploy/non-clustered/jms-ds.xml
===================================================================
--- trunk/messaging/src/etc/deploy/non-clustered/jms-ds.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/messaging/src/etc/deploy/non-clustered/jms-ds.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connection-factories>
-
-  <!-- ==================================================================== -->
-  <!-- JMS Stuff                                                            -->
-  <!-- ==================================================================== -->
-
-   <!--
-       The JMS provider loader. Currently pointing to a non-clustered ConnectionFactory. Need to
-       be replaced with a clustered non-load-balanced ConnectionFactory when it becomes available.
-       See http://jira.jboss.org/jira/browse/JBMESSAGING-843. 
-   -->
-   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
-          name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
-      <attribute name="ProviderName">DefaultJMSProvider</attribute>
-      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
-      <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
-      <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
-      <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
-   </mbean>
-
-   <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
-   <tx-connection-factory>
-      <jndi-name>JmsXA</jndi-name>
-      <xa-transaction/>
-      <rar-name>jms-ra.rar</rar-name>
-      <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
-      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
-      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
-      <max-pool-size>20</max-pool-size>
-      <security-domain-and-application>JmsXARealm</security-domain-and-application>
-      <depends>jboss.messaging:service=ServerPeer</depends>
-   </tx-connection-factory>
-
-</connection-factories>

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/testsuite/build.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -686,6 +686,9 @@
      <include name="org/jboss/test/jbossmessaging/ra/*UnitTestCase.class"/>
      <include name="org/jboss/test/jms/integration/**/*Test.class"/>
    </patternset>
+   <patternset id="jbossmessaging-clustering.includes">
+     <include name="org/jboss/test/jbossmessaging/clustertest/*TestCase.class"/>
+   </patternset>
    <!-- jbossmessaging excludes -->
    <patternset id="jbossmessaging.excludes">
      <exclude name="org/jboss/test/jbossmessaging/test/*UnitTestCase.class"/>
@@ -914,6 +917,7 @@
       <antcall target="tests-security-jaspi-unit"/>
 -->
       <antcall target="tests-jbossmessaging"/>
+      <antcall target="tests-jbossmessaging-cluster"/>
       <antcall target="tests-compatibility"/>
       <antcall target="tests-aop-scoped"/>
       <antcall target="jrmp-invoker-tests"/>
@@ -2394,6 +2398,106 @@
       <server:stop name="jbpm-bpel"/>
    </target>
 
+	
+   <!-- ============================================= JBM Targets ============================= -->
+	
+   <!--  Starts two servers, run few simultaneous tests, kill the server only once and get the results of all the tests  -->
+   <target name="tests-jbossmessaging-cluster"
+   	   description="Run JBM in cluster">
+
+  	  <delete dir="${jboss.dist}/server/jbm-cluster1" />
+   	  <delete dir="${jboss.dist}/server/jbm-cluster2" />
+      <create-config baseconf="all" newconf="jbm-cluster1">
+         <patternset>
+            <include name="conf/**"/>
+            <include name="deploy/**"/>
+            <include name="deployers/**"/>
+            <include name="deploy-hasingleton/**"/>
+            <include name="lib/**"/>
+         </patternset>
+      </create-config>
+      <create-config baseconf="all" newconf="jbm-cluster2">
+         <patternset>
+            <include name="conf/**"/>
+             <include name="deploy/**"/>
+             <include name="deployers/**"/>
+             <include name="deploy-hasingleton/**"/>
+             <include name="lib/**"/>
+         </patternset>
+      </create-config>
+
+      <server:start name="jbm-cluster1"/>
+      <server:start name="jbm-cluster2"/>
+
+      <antcall target="exec-jbmcluster"/>
+
+      <!--  I'm not stopping jbm-cluster2 as this server will be killed during the test -->            
+      <server:stop name="jbm-cluster1"/>
+   	   
+   </target>
+   
+  <!-- Test the Messaging JMS provider -->
+  <target name="exec-jbmcluster">
+    <mkdir dir="${build.reports}"/>
+    <mkdir dir="${build.testlog}"/>
+    <junit dir="${module.output}"
+      printsummary="${junit.printsummary}"
+      haltonerror="${junit.haltonerror}"
+      haltonfailure="${junit.haltonfailure}"
+      fork="${junit.fork}"
+      timeout="${junit.timeout}"
+      jvm="${junit.jvm}">
+
+      <jvmarg line="${junit.jvm.options}"/>
+      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+      <sysproperty key="build.testlog" value="${build.testlog}"/>
+      <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
+      <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+      <sysproperty key="jbosstest.server.host" value="${node0}"/>
+      <sysproperty key="jbosstest.useJBM" value="true"/>
+      
+      <sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+      <sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
+      <sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
+      <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+      <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
+      <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
+      
+
+        <!-- Pass along any jbosstest.* system properties -->
+         <syspropertyset>
+            <propertyref prefix="jbosstest."/>
+         </syspropertyset>
+
+      <classpath>
+        <pathelement location="${build.classes}"/>
+        <pathelement location="${build.resources}"/>
+        <pathelement location="${build.resources}/jbossmessaging"/>
+        <pathelement location="${build.lib}/jbossmessagingtest.jar"/>
+        <path refid="tests.classpath"/>
+      </classpath>
+
+      <!-- formatter type="xml" usefile="${junit.formatter.usefile}"/ -->
+      <sysproperty key="jboss-junit-configuration" value="tests-jbossmessaging-cluster"/>
+      <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+                 usefile="${junit.formatter.usefile}"
+                 extension="-tests-jbossmessaging.xml"/>
+
+      <batchtest todir="${build.reports}"
+        haltonerror="${junit.batchtest.haltonerror}"
+        haltonfailure="${junit.batchtest.haltonfailure}"
+        fork="${junit.batchtest.fork}">
+         <fileset dir="${build.classes}">
+            <patternset refid="jbossmessaging-clustering.includes"/>
+         </fileset>
+      </batchtest>
+    </junit>
+   </target>
+  
+
+   
+
+
    <!--
      | Run JMS tests against the Messaging JMS provider
    -->
@@ -2414,6 +2518,8 @@
       <server:stop name="jbossmessaging"/>
    </target>
 
+
+
   <!-- Test the Messaging JMS provider -->
   <target name="tests-jbossmessaging-unit">
     <mkdir dir="${build.reports}"/>
@@ -2464,6 +2570,8 @@
     </junit>
    </target>
   
+   <!-- ========================================= END JBM Targets ============================= -->
+
   <target name="tests-classloader-leak">
 
     <mkdir dir="${build.reports}"/>

Added: trunk/testsuite/imports/sections/jbossmessaging-cluster.xml
===================================================================
--- trunk/testsuite/imports/sections/jbossmessaging-cluster.xml	                        (rev 0)
+++ trunk/testsuite/imports/sections/jbossmessaging-cluster.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,14 @@
+<project name="tests-jbm-jars">
+   
+   <!-- jms tests -->
+   <target name="_jars-jbossmessaging-cluster">
+      <mkdir dir="${build.lib}"/>
+      
+      <jar destfile="${build.lib}/jbm-killservice.sar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/jbossmessaging/clustertest/killservice/*"/>
+         </fileset>
+         <zipfileset dir="${build.resources}/jbossmessaging/meta-inf-killserver" prefix="META-INF/"/>
+      </jar>	
+   </target>
+</project>


Property changes on: trunk/testsuite/imports/sections/jbossmessaging-cluster.xml
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/testsuite/imports/server-config.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -627,7 +627,29 @@
          <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}" />
-      </server>   	
+      </server>
+      <server name="jbm-cluster1" host="${node0}">
+           <jvmarg value="-Xms128m" />
+           <jvmarg value="-Xmx512m" />
+           <jvmarg value="-XX:MaxPermSize=512m" />
+           <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+           <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+           <sysproperty key="java.net.preferIPv4Stack" value="true" />
+      </server>
+       	
+      <server name="jbm-cluster2" host="${node1}">
+           <jvmarg value="-Xms128m" />
+           <jvmarg value="-Xmx512m" />
+           <jvmarg value="-XX:MaxPermSize=512m" />
+           <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+            <sysproperty key="java.net.preferIPv4Stack" value="true" />
+           <sysproperty key="jbossnode0" value="${node0}"/>
+           <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+            <sysproperty key="java.net.preferIPv4Stack" value="true" />
+    	   <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
+      </server>
+
+   	
    </server:config>
 
     <!-- A macro for printing sleep before going into sleep

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2008-04-15 23:24:36 UTC (rev 72250)
+++ trunk/testsuite/imports/test-jars.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -32,6 +32,7 @@
    <import file="sections/iiop.xml"/>
    <import file="sections/invokers.xml"/>
    <import file="sections/isolation.xml"/>
+   <import file="sections/jbossmessaging-cluster.xml"/>
    <import file="sections/jbossmessaging.xml"/>
    <import file="sections/jbossmq.xml"/>
    <import file="sections/jbossmx.xml"/>
@@ -76,6 +77,7 @@
    <import file="sections/xa.xml"/>
    <import file="sections/xslt.xml"/>
    <import file="sections/byvalue.xml"/>
+	
 
    <!--
      | Build all jar files.
@@ -118,6 +120,7 @@
         _jars-invokers,
         _jars-isolation,
         _jars-jbossmessaging,
+	    _jars-jbossmessaging-cluster,
         _jars-jbossmq,
         _jars-jbossmx,
         _jars-jbpm,

Added: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,700 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.clustertest;
+
+import java.util.StringTokenizer;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
+
+import org.jboss.jms.client.FailoverEvent;
+import org.jboss.jms.client.FailoverListener;
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.test.JBossClusteredTestCase;
+import org.jboss.test.JBossTestClusteredServices;
+import org.jboss.test.JBossTestClusteredSetup;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.util.id.GUID;
+
+import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
+
+import junit.framework.Test;
+
+/**
+ * 
+ * Each failover test would require a whole shutdown cycle, what means.. start, run test, kill, assert.. (for each test).
+ * Instead of doing that we run tests in parallel, using this little framework defined by ParallelTestContainer and assert all of them in a single server kill.
+ * Also: System.exit(-1); wasn't enough to perform a server crash, as it was causing a regular shutdown, so we are using some reflection to call java.lang.Shutdown#halt.
+ * @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
+ *
+ */
+public class ClusteredTestCase extends ParallelTestContainer
+{
+
+    CountDownLatch latchCluster = new CountDownLatch(1);
+    CountDownLatch latchFailover = new CountDownLatch(getTests().length);
+    CountDownLatch latchServerAlreadyKilled = new CountDownLatch(1);
+
+    public ParallelTest[] getTests()
+    {
+        return new ParallelTest[]
+        { new ClusterTestSimple(latchCluster), 
+            new FailoverTestSimple(latchFailover, latchServerAlreadyKilled),
+            new FailoverTestSimpleTransacted("testFailoverTransactedKillOnCommit", true, latchFailover, latchServerAlreadyKilled, "testDistributedQueueC"),
+            new FailoverTestSimpleTransacted("testFailoverTransactedKillOnMessageReceive", false, latchFailover, latchServerAlreadyKilled, "testDistributedQueueD"),
+            new FailoverTestSessionWithOneTransactedPersistentMessageFailover(latchFailover, latchServerAlreadyKilled),
+            new FailoverSessionWithOneTransactedNonPersistentMessageFailover(latchFailover, latchServerAlreadyKilled)};
+    }
+
+    public void doTest() throws Exception
+    {
+        JBossTestClusteredServices testServices = new JBossTestClusteredServices(ClusteredTestCase.class);
+        testServices.setUp();
+        
+        
+        
+        MBeanServerConnection rmi = testServices.getAdaptor(1);
+        
+        ObjectName name = new ObjectName("test:name=JBMKillService");
+        if (testServices.getServerCount() != 2)
+        {
+            throw new Exception ("This test requires 2 servers but it got with " + testServices.getServerCount());
+        }
+        
+        latchCluster.await();
+        
+        System.out.println("Clustered tests have finished");
+        
+        latchFailover.await(10, java.util.concurrent.TimeUnit.SECONDS);
+
+        if (latchCluster.getCount() != 0)
+        {
+        	throw new IllegalStateException ("Test didn't finish properly");
+        }
+        
+        System.out.println("Ready to kill");
+
+        rmi.invoke(name, "kill", new Integer[]{1000}, new String[]{"int"});
+        
+        Thread.sleep(1000);
+        
+        System.out.println("Server already killed");
+        latchServerAlreadyKilled.countDown();
+        
+    }
+
+
+    
+    protected static int getServerId(Connection conn)
+    {
+        return ((JBossConnection) conn).getServerID();
+    }
+
+    protected Connection createConnectionOnServer(ConnectionFactory factory,
+            int serverId) throws Exception
+    {
+        int count = 0;
+
+        while (true)
+        {
+            if (count++ > 10)
+                throw new IllegalStateException(
+                        "Cannot make connection to node " + serverId);
+
+            Connection connection = factory.createConnection();
+
+            if (getServerId(connection) == serverId)
+            {
+                return connection;
+            } else
+            {
+                connection.close();
+            }
+        }
+    }
+    
+    abstract class FailoverTest extends ParallelTest
+    {
+        Context ctx;
+        ConnectionFactory cf;
+        CountDownLatch latch;
+        CountDownLatch latchAlreadyKilled;
+
+        public FailoverTest(String name, CountDownLatch latch, CountDownLatch latchAlreadyKilled)
+        {
+            super(name);
+            this.latch = latch;
+            this.latchAlreadyKilled = latchAlreadyKilled;
+        }
+
+        public void setUp() throws Exception
+        {
+            super.setUp();
+            ctx = new InitialContext();
+            cf = (ConnectionFactory) ctx.lookup("/ClusteredConnectionFactory");
+        }
+
+        public abstract void runTest() throws Throwable;
+        
+    }
+
+    class FailoverTestSimple extends FailoverTest
+    {
+
+
+        public FailoverTestSimple(CountDownLatch latch, CountDownLatch latchAlreadyKilled)
+        {
+            super("testSimpleFailover", latch, latchAlreadyKilled);
+        }
+
+        public void setUp() throws Exception
+        {
+            super.setUp();
+        }
+
+        public void tearDown() throws Exception
+        {
+            super.tearDown();
+        }
+
+        public void runTest() throws Exception
+        {
+
+            boolean latchCalled = false;
+            Connection conn0 = null;
+            try
+            {
+                conn0 = createConnectionOnServer(cf, 1);
+                Queue queue = (Queue)ctx.lookup("/queue/testDistributedQueueA");
+                
+                
+                
+                Session session0 = conn0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                MessageConsumer consumer = session0.createConsumer(queue);
+                MessageProducer producer = session0.createProducer(queue);
+                conn0.start();
+                
+                String strmsg = "Hello from " + this.getName() + " guid="+ new GUID().toString();
+
+                producer.send(session0.createTextMessage(strmsg));
+                
+                latchCalled = true;
+                latch.countDown();
+                latchAlreadyKilled.await();
+                
+                TextMessage msg = (TextMessage)consumer.receive(50000);
+                assertNotNull("message not received", msg);
+                assertEquals(strmsg, msg.getText());
+                
+            } 
+            finally
+            {
+                try
+                {
+                    if (conn0 != null)
+                    {
+                        conn0.close();
+                    }
+                }
+                catch (Throwable ignored)
+                {
+                    // It should never happen, but better to send it to System.out than just ignore it
+                    ignored.printStackTrace();
+                }
+
+                if (!latchCalled) 
+                {
+                    latch.countDown();
+                }
+            
+            }
+        }
+
+    }
+    
+    class FailoverTestSimpleTransacted extends FailoverTest
+    {
+
+        String jndiQueue;
+        boolean killOnTransaction;
+
+        public FailoverTestSimpleTransacted(String name, boolean killOnTransaction, CountDownLatch latch, CountDownLatch latchAlreadyKilled, String jndiQueue)
+        {
+            super(name, latch, latchAlreadyKilled);
+            this.killOnTransaction = killOnTransaction;
+            this.jndiQueue = jndiQueue;
+        }
+
+        public void setUp() throws Exception
+        {
+            super.setUp();
+        }
+
+        public void tearDown() throws Exception
+        {
+            super.tearDown();
+        }
+
+        public void runTest() throws Exception
+        {
+
+            boolean latchCalled = false;
+            Connection conn0 = null;
+            try
+            {
+                conn0 = createConnectionOnServer(cf, 1);
+                Queue queue = (Queue)ctx.lookup("/queue/" + jndiQueue);
+                
+                Session session0 = conn0.createSession(true, Session.CLIENT_ACKNOWLEDGE);
+                MessageConsumer consumer = session0.createConsumer(queue);
+                MessageProducer producer = session0.createProducer(queue);
+                conn0.start();
+                
+                String strmsg = "Hello from " + this.getName() + " guid="+ new GUID().toString();
+
+                producer.send(session0.createTextMessage(strmsg));
+                session0.commit();
+                
+
+                if (!killOnTransaction)
+                {
+                    latchCalled = true;
+                    latch.countDown();
+                    latchAlreadyKilled.await();
+                    
+                    System.out.println("After kill on (kill on receive)");
+                }
+                
+                TextMessage msg = (TextMessage)consumer.receive(50000);
+                
+                msg.acknowledge();
+                
+                if (killOnTransaction)
+                {
+                    latchCalled = true;
+                    latch.countDown();
+                    latchAlreadyKilled.await();
+                    System.out.println("After kill on (kill on commit)");
+                }
+                
+                session0.commit();
+                
+                assertNotNull("message not received", msg);
+                assertEquals(strmsg, msg.getText());
+                
+                msg =  (TextMessage)consumer.receive(1000);
+                assertNull("Message Queue should be empty by now!", msg);
+                
+            } 
+            finally
+            {
+                try
+                {
+                    if (conn0 != null)
+                    {
+                        conn0.close();
+                    }
+                }
+                catch (Throwable ignored)
+                {
+                    // It should never happen, but better to send it to System.out than just ignore it
+                    ignored.printStackTrace();
+                }
+
+                if (!latchCalled)
+                {
+                    latch.countDown();
+                }
+            }
+        }
+
+    }
+
+    class ClusterTestSimple extends ParallelTest
+    {
+
+        Context ctx;
+        ConnectionFactory cf;
+        CountDownLatch latch;
+
+        public ClusterTestSimple(CountDownLatch latch)
+        {
+            super("testSimpleCluster");
+
+            this.latch = latch;
+        }
+
+        public void setUp() throws Exception
+        {
+            ctx = new InitialContext();
+            cf = (ConnectionFactory) ctx.lookup("/ClusteredConnectionFactory");
+        }
+
+        public void tearDown() throws Exception
+        {
+            super.tearDown();
+        }
+
+        public void runTest() throws Exception
+        {
+
+            Connection conn0 = null, conn1 = null;
+            try
+            {
+                conn0 = createConnectionOnServer(cf, 0);
+                conn1 = createConnectionOnServer(cf, 1);
+                Queue queue = (Queue)ctx.lookup("/queue/testDistributedQueueB");
+                
+                Session session1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                MessageConsumer consumer = session1.createConsumer(queue);
+                conn1.start();
+                
+                
+                Session session0 = conn0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                MessageProducer producer = session0.createProducer(queue);
+                
+                String strmsg = "Hello from " + this.getName() + " guid="+ new GUID().toString();
+                
+                producer.send(session0.createTextMessage(strmsg));
+                
+                
+                TextMessage msg = (TextMessage)consumer.receive(50000);
+                assertNotNull("message not received", msg);
+                assertEquals(strmsg, msg.getText());
+                
+            } 
+            finally
+            {
+                try
+                {
+                    if (conn0 != null)
+                    {
+                        conn0.close();
+                    }
+                }
+                catch (Throwable ignored)
+                {
+                    // It should never happen, but better to send it to System.out than just ignore it
+                    ignored.printStackTrace();
+                }
+                try
+                {
+                    if (conn1 != null)
+                    {
+                        conn1.close();
+                    }
+                }
+                catch (Throwable ignored)
+                {
+                    // It should never happen, but better to send it to System.out than just ignore it
+                    ignored.printStackTrace();
+                }
+                
+                latch.countDown();
+            }
+        }
+
+    }
+    
+    class FailoverTestSessionWithOneTransactedPersistentMessageFailover extends FailoverTest
+    {
+
+        public FailoverTestSessionWithOneTransactedPersistentMessageFailover(
+                CountDownLatch latch,
+                CountDownLatch latchAlreadyKilled)
+        {
+            super("testSessionWithOneTransactedPersistentMessageFailover", latch, latchAlreadyKilled);
+        }
+        
+        public void setUp() throws Exception
+        {
+            super.setUp();
+        }
+        
+        public void runTest() throws Throwable
+        {
+            boolean latchAlreadyCalled = false;
+            Connection conn = null;
+
+            Queue queue = (Queue) ctx.lookup("/queue/testDistributedQueueE");
+            
+            try
+            {
+               conn = createConnectionOnServer(cf, 1);
+
+               conn.start();
+
+               Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
+
+               // send 2 transacted messages (one persistent and one non-persistent) but don't commit
+               MessageProducer prod = session.createProducer(queue);
+
+               prod.setDeliveryMode(DeliveryMode.PERSISTENT);
+               prod.send(session.createTextMessage("clik-persistent"));
+
+               // close the producer
+               prod.close();
+
+               System.out.println("producer closed");
+
+               // create a consumer on the same local queue (creating a consumer AFTER failover will end
+               // up getting messages from a local queue, not a failed over queue; at least until
+               // redistribution is implemented.
+
+               Session session2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+               MessageConsumer cons = session2.createConsumer(queue);
+
+               // register a failover listener
+               SimpleFailoverListener failoverListener = new SimpleFailoverListener();
+               ((JBossConnection)conn).registerFailoverListener(failoverListener);
+
+               latchAlreadyCalled = true;
+               latch.countDown();
+               latchAlreadyKilled.await();
+
+               // wait for the client-side failover to complete
+
+               while(true)
+               {
+                  FailoverEvent event = failoverListener.getEvent(50000);
+                  if (event != null && FailoverEvent.FAILOVER_COMPLETED == event.getType())
+                  {
+                     break;
+                  }
+                  if (event == null)
+                  {
+                     fail("Did not get expected FAILOVER_COMPLETED event");
+                  }
+               }
+
+               // failover complete
+               assertEquals(0, getServerId(conn));
+
+               // commit the failed-over session
+               session.commit();
+
+               // make sure messages made it to the queue
+
+               TextMessage tm = (TextMessage)cons.receive(2000);
+               assertNotNull(tm);
+               assertEquals("clik-persistent", tm.getText());
+            }
+            finally
+            {
+               if (!latchAlreadyCalled)
+               {
+                   latch.countDown();
+               }
+               if (conn != null)
+               {
+                  conn.close();
+               }
+            }
+        }
+        
+    }
+    
+    class FailoverSessionWithOneTransactedNonPersistentMessageFailover extends FailoverTest
+    {
+
+        public FailoverSessionWithOneTransactedNonPersistentMessageFailover(
+                CountDownLatch latch,
+                CountDownLatch latchAlreadyKilled)
+        {
+            super("testSessionWithOneTransactedNonPersistentMessageFailover", latch, latchAlreadyKilled);
+        }
+        
+        public void setUp() throws Exception
+        {
+            super.setUp();
+        }
+        
+        public void runTest() throws Throwable
+        {
+            Connection conn = null;
+            
+            boolean latchCalled = false;
+            
+            Queue queue = (Queue) ctx.lookup("queue/testDistributedQueueF");
+
+            try
+            {
+               conn = createConnectionOnServer(cf, 1);
+
+               conn.start();
+
+               Session session = conn.createSession(true, Session.SESSION_TRANSACTED);
+
+               MessageProducer prod = session.createProducer(queue);
+
+               prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+               prod.send(session.createTextMessage("clik-non-persistent"));
+
+               // close the producer
+               prod.close();
+
+               // create a consumer on the same local queue (creating a consumer AFTER failover will end
+               // up getting messages from a local queue, not a failed over queue; at least until
+               // redistribution is implemented.
+
+               Session session2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+               MessageConsumer cons = session2.createConsumer(queue);
+
+               // register a failover listener
+               SimpleFailoverListener failoverListener = new SimpleFailoverListener();
+               ((JBossConnection)conn).registerFailoverListener(failoverListener);
+
+               latchCalled = true;
+               latch.countDown();
+               latchAlreadyKilled.await();
+
+               // wait for the client-side failover to complete
+
+               while(true)
+               {
+                  FailoverEvent event = failoverListener.getEvent(30000);
+                  if (event != null && FailoverEvent.FAILOVER_COMPLETED == event.getType())
+                  {
+                     break;
+                  }
+                  if (event == null)
+                  {
+                     fail("Did not get expected FAILOVER_COMPLETED event");
+                  }
+               }
+
+               // failover complete
+
+               assertEquals(0, getServerId(conn));
+
+               // commit the failed-over session
+               session.commit();
+
+               // make sure messages made it to the queue
+
+               TextMessage tm = (TextMessage)cons.receive(2000);
+               assertNotNull(tm);
+               assertEquals("clik-non-persistent", tm.getText());
+            }
+            finally
+            {
+               if (!latchCalled)
+               {
+                   latch.countDown();
+               }
+               if (conn != null)
+               {
+                  conn.close();
+               }
+            }
+        }
+    }
+    
+    
+    public static Test suite() throws Exception
+    {
+        ClassLoader loader = ClusteredTestCase.class.getClassLoader(); 
+
+        final String destinations = loader.getResource("jbossmessaging/test-clustered-destinations-full-service.xml").toString();
+        final String jarNames = destinations + "," + "jbm-killservice.sar";
+        final Test test = new ClusteredTestCase();
+        
+        
+        JBossTestSetup wrapper = new JBossTestClusteredSetup(test, jarNames)
+        {
+
+           // Since the server will be killed, we can't undeploy using the regular ClusteredSetup, or we would get a false error
+           protected void tearDown() throws Exception
+           {
+              
+              if (jarNames != null)
+              {
+                 JBossTestClusteredServices clusteredDelegate = (JBossTestClusteredServices) delegate;
+                 
+                 // deploy the comma seperated list of jars
+                 StringTokenizer st = new StringTokenizer(jarNames, ", ");
+                 String[] depoyments = new String[st.countTokens()];
+                 for (int i = depoyments.length - 1; i >= 0; i--)
+                    depoyments[i] = st.nextToken();
+                 for (int i = 0; i < depoyments.length; i++)
+                 {
+                    String jarName = depoyments[i];
+                    this.getLog().debug("Attempt undeploy of " + jarName);
+                    clusteredDelegate.undeploy(clusteredDelegate.getAdaptor(0), jarName);
+                    this.getLog().debug("undeployed package: " + jarName);
+                 }            
+              }
+           }
+        };
+        return wrapper;
+        
+    }
+    
+    
+    // Inner classes --------------------------------------------------------------------------------
+    
+    protected class SimpleFailoverListener implements FailoverListener
+    {
+       private LinkedQueue buffer;
+
+       public SimpleFailoverListener()
+       {
+          buffer = new LinkedQueue();
+       }
+
+       public void failoverEventOccured(FailoverEvent event)
+       {
+          try
+          {
+             buffer.put(event);
+          }
+          catch(InterruptedException e)
+          {
+             throw new RuntimeException("Putting thread interrupted while trying to add event " +
+                "to buffer", e);
+          }
+       }
+
+       /**
+        * Blocks until a FailoverEvent is available or timeout occurs, in which case returns null.
+        */
+       public FailoverEvent getEvent(long timeout) throws InterruptedException
+       {
+          return (FailoverEvent)buffer.poll(timeout);
+       }
+    }
+    
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ClusteredTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Added: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTest.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTest.java	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.clustertest;
+
+import junit.framework.TestCase;
+import junit.framework.TestListener;
+import junit.framework.TestResult;
+
+/**
+ * On clustered Tests we execute a series of tests simultaneously, and get the
+ * results at once. This is done because several tests will require a server
+ * kill. Doing the test this way we can save a bunch of server kills
+
+ * @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
+ */
+public abstract class ParallelTest extends TestCase
+{
+
+    boolean isSuccess;
+
+    public TestResult result;
+    public Thread t;
+    public TestListener listener;
+
+    public ParallelTest(String name)
+    {
+        super(name);
+    }
+
+
+    public void setListener(TestListener listener)
+    {
+        this.listener = listener;
+    }
+    
+    public void run(TestResult result)
+    {
+        result.addListener(listener);
+        super.run(result);
+    }
+
+    
+    public abstract void runTest() throws Throwable;
+    
+    class LocalThread extends Thread
+    {
+        public void run()
+        {
+            ParallelTest.this.run();
+        }
+    }
+
+    public void startTest()
+    {
+        t = new LocalThread();
+        t.start();
+    }
+
+    public void join() throws InterruptedException
+    {
+        t.join();
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTest.java
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Added: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTestContainer.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTestContainer.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTestContainer.java	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,121 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.clustertest;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestListener;
+import junit.framework.TestResult;
+
+/**
+ * 
+ * @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
+ *
+ */
+public abstract class ParallelTestContainer implements Test
+{
+
+    public abstract ParallelTest[] getTests();
+    
+    public void run(TestResult res)
+    {
+        AggregatorListener listener = new AggregatorListener(res);
+        
+        ParallelTest tests[] = getTests();
+        
+        for (ParallelTest test: tests)
+        {
+            test.setListener(listener);
+            test.startTest();
+        }
+        
+        try
+        {
+            doTest();
+        }
+        catch (Throwable e)
+        {
+            res.addError(this, e);
+        }
+        
+        for (ParallelTest test: tests)
+        {
+            try
+            {
+                test.join();
+            } catch (InterruptedException ignored)
+            {
+                // this should never happen, but case it ever happens doesn't hurt anything some debug info on the System.out
+                ignored.printStackTrace();
+            }
+        }
+        
+    }
+    
+    
+    // This execution point could be used to do some logic as tests are being executed
+    public abstract void doTest() throws Throwable;
+    
+    
+   
+    class AggregatorListener implements TestListener
+    {
+        
+        TestResult target;
+
+        public AggregatorListener(TestResult target)
+        {
+            this.target=target;
+        }
+
+        public void addError(Test test, Throwable t)
+        {
+            
+            target.addError(test, t);
+        }
+
+        public void addFailure(Test test, AssertionFailedError t)
+        {
+            target.addFailure(test, t);
+        }
+
+        public void endTest(Test test)
+        {
+            target.endTest(test);
+        }
+
+        public void startTest(Test test)
+        {
+            target.startTest(test);
+        }
+    }
+    
+    public int countTestCases()
+    {
+        return 1;
+    }
+    
+    
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/ParallelTestContainer.java
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Added: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillService.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillService.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillService.java	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,70 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.clustertest.killservice;
+
+import java.lang.reflect.Method;
+
+import org.jboss.system.ServiceMBeanSupport;
+
+
+public class KillService extends ServiceMBeanSupport implements KillServiceMBean
+{
+
+    public void kill(final int miliseconds)
+    {
+        new Thread()
+        {
+            public void run()
+            {
+                try
+                {
+                    System.out.println("Server will be killed in " + miliseconds + " miliseconds");
+                    Thread.sleep(miliseconds);
+                    try
+                    {
+                        /** We need a real halt for failover, as System.exit would cause a regular shutdown process */
+                        Class clazz = this.getClass().getClassLoader().loadClass("java.lang.Shutdown");
+                        Method method = clazz.getDeclaredMethod("halt",  new Class[]{Integer.TYPE});
+                        method.setAccessible(true);
+                        System.out.println("Halt forced!");
+                        System.out.flush();
+                        method.invoke(null, new Object[]{new Integer(-1)});
+                    }
+                    catch (Exception ex)
+                    {
+                        ex.printStackTrace();
+                    }
+                }
+                catch (Exception ignored)
+                {
+                    // nothing to do if it's interrupted
+                }
+                
+                
+            }
+        }.start();
+        
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillService.java
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Added: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillServiceMBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillServiceMBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillServiceMBean.java	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,29 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.clustertest.killservice;
+
+public interface KillServiceMBean
+{
+   public void kill(int seconds);
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/jbossmessaging/clustertest/killservice/KillServiceMBean.java
___________________________________________________________________
Name: svn:keywords
   + Id LastChangedDate Author Revision

Added: trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/jboss-service.xml
===================================================================
--- trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/jboss-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/jboss-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- This is used by org.jboss.test.jbossmessaging.clustertest.ClusteredTestCase -->
+
+<!DOCTYPE server
+    PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
+
+<server>
+
+   <mbean code="org.jboss.test.jbossmessaging.clustertest.killservice.KillService"
+      name="test:name=JBMKillService">
+   </mbean>
+
+</server>


Property changes on: trunk/testsuite/src/resources/jbossmessaging/meta-inf-killserver/jboss-service.xml
___________________________________________________________________
Name: svn:keywords
   + "Id LastChangedDate Author Revision"

Added: trunk/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml
===================================================================
--- trunk/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,84 @@
+<?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>


Property changes on: trunk/testsuite/src/resources/jbossmessaging/test-clustered-destinations-full-service.xml
___________________________________________________________________
Name: svn:keywords
   + "Id LastChangedDate Author Revision"

Added: trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/hsqldb-ds.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/hsqldb-ds.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/hsqldb-ds.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml 39791 2006-01-10 18:14:42Z dimitris $ -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>HsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+
+      <depends>jboss:service=Hypersonic</depends>
+   </local-tx-datasource>
+
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic">
+     <attribute name="Port">1701</attribute>
+     <attribute name="BindAddress">${jboss.bind.address}</attribute>     
+     <attribute name="Silent">true</attribute>
+     <attribute name="Database">default</attribute>
+     <attribute name="Trace">false</attribute>
+     <attribute name="No_system_exit">true</attribute>
+   </mbean>
+
+</datasources>


Property changes on: trunk/testsuite/src/resources/test-configs/jbm-cluster1/deploy/hsqldb-ds.xml
___________________________________________________________________
Name: svn:keywords
   + "Id LastChangedDate Author Revision"

Added: trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/hsqldb-ds.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/hsqldb-ds.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/hsqldb-ds.xml	2008-04-16 00:38:50 UTC (rev 72251)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml 39791 2006-01-10 18:14:42Z dimitris $ -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <connection-url>jdbc:hsqldb:hsql://${jbossnode0}:1701</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>HsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!-- HSQL DB benefits from prepared statement caching -->
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+
+   </local-tx-datasource>
+
+</datasources>


Property changes on: trunk/testsuite/src/resources/test-configs/jbm-cluster2/deploy/hsqldb-ds.xml
___________________________________________________________________
Name: svn:keywords
   + "Id LastChangedDate Author Revision"




More information about the jboss-cvs-commits mailing list