[jboss-cvs] JBoss Messaging SVN: r2973 - in trunk/tests: src/org/jboss/test/messaging/tools/container and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 7 15:43:08 EDT 2007


Author: timfox
Date: 2007-08-07 15:43:08 -0400 (Tue, 07 Aug 2007)
New Revision: 2973

Modified:
   trunk/tests/etc/jbossjta-properties.xml
   trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
Log:
Make sure node identifier is unique


Modified: trunk/tests/etc/jbossjta-properties.xml
===================================================================
--- trunk/tests/etc/jbossjta-properties.xml	2007-08-07 19:29:40 UTC (rev 2972)
+++ trunk/tests/etc/jbossjta-properties.xml	2007-08-07 19:43:08 UTC (rev 2973)
@@ -55,7 +55,6 @@
         <!--
         (Must be unique across all Arjuna instances.)
       -->
-        <property name="com.arjuna.ats.arjuna.xa.nodeIdentifier" value="1"/>
         <!-- property
         name="com.arjuna.ats.arjuna.coordinator.actionStore"
 		value="HashedActionStore"

Modified: trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2007-08-07 19:29:40 UTC (rev 2972)
+++ trunk/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2007-08-07 19:43:08 UTC (rev 2973)
@@ -1076,7 +1076,22 @@
       {
          if (jbossjta)
          {
-            setObjectStore();         
+         	//We must ensure each node has its own object store
+            String newObjectStore = "TestObjectStore-" + new GUID().toString();
+            
+            log.info("Setting com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR to " + newObjectStore);
+
+            System.setProperty(com.arjuna.ats.arjuna.common.Environment.OBJECTSTORE_DIR, newObjectStore);  
+            
+            //We must also make sure the node identifier is unique for each node
+            //Otherwise xids might overlap
+            String arjunanodeId = "TestNodeID-" + new GUID().toString();
+            
+            log.info("Setting com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER to " + arjunanodeId);
+            
+            System.setProperty(com.arjuna.ats.arjuna.common.Environment.XA_NODE_IDENTIFIER, arjunanodeId);
+            
+            log.info("Setting objectstore.dir to " + newObjectStore);
          	
             log.info("Starting arjuna tx mgr");
             tm = com.arjuna.ats.jta.TransactionManager.transactionManager();                       




More information about the jboss-cvs-commits mailing list