[jboss-cvs] JBoss Messaging SVN: r3724 - in trunk: tests and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 15 09:34:32 EST 2008


Author: jmesnil
Date: 2008-02-15 09:34:32 -0500 (Fri, 15 Feb 2008)
New Revision: 3724

Modified:
   trunk/src/main/org/jboss/messaging/core/Configuration.java
   trunk/tests/build.xml
Log:
* added support for sys property jbm.remoting.disable.invm to disable remoting invm optimization (used to run all the test suite using remoting code path)

Modified: trunk/src/main/org/jboss/messaging/core/Configuration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/Configuration.java	2008-02-15 14:31:29 UTC (rev 3723)
+++ trunk/src/main/org/jboss/messaging/core/Configuration.java	2008-02-15 14:34:32 UTC (rev 3724)
@@ -27,10 +27,8 @@
 import java.beans.PropertyChangeSupport;
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 
-import org.jboss.jms.server.security.Role;
 import org.jboss.messaging.core.remoting.RemotingConfiguration;
 import org.jboss.messaging.core.remoting.TransportType;
 
@@ -90,6 +88,8 @@
    protected Integer _remotingTimeout;
 
    protected Boolean _remotingDisableInvm = false;
+   
+   private static final String REMOTING_DISABLE_INVM_SYSPROP_KEY = "jbm.remoting.disable.invm";
 
    public  void addPropertyChangeListener(
          PropertyChangeListener listener)
@@ -284,7 +284,13 @@
    {
       RemotingConfiguration configuration = new RemotingConfiguration(_remotingTransport, "localhost", _remotingBindAddress);
       configuration.setTimeout(_remotingTimeout);
-      configuration.setInvmDisabled(_remotingDisableInvm);
+      if (System.getProperty(REMOTING_DISABLE_INVM_SYSPROP_KEY) != null)
+      {
+         configuration.setInvmDisabled(Boolean.parseBoolean(System.getProperty(REMOTING_DISABLE_INVM_SYSPROP_KEY)));
+      } else 
+      {
+         configuration.setInvmDisabled(_remotingDisableInvm);
+      }
       return configuration;
    }
 

Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml	2008-02-15 14:31:29 UTC (rev 3723)
+++ trunk/tests/build.xml	2008-02-15 14:34:32 UTC (rev 3724)
@@ -51,6 +51,7 @@
    <property file="build.properties"/>
 
    <property name="build.tests.remote" value="false"/>
+   <property name="disable.invm" value="false"/>
    <property name="test.bind.address" value="localhost"/>
    <property name="jboss.messaging.groupname" value="MessagingPostOffice"/>
    <property name="jboss.messaging.datachanneludpport" value="45567"/>
@@ -462,7 +463,7 @@
            description="Runs all available tests an in-VM configuration">
 
       <echo message=""/>
-      <echo message="Running invm tests, fork=${junit.fork}, junit.batchtest.fork=${junit.batchtest.fork}"/>
+      <echo message="Running invm tests, fork=${junit.fork}, junit.batchtest.fork=${junit.batchtest.fork}, disable.invm=${disable.invm}"/>
       <echo message=""/>
 
       <junit printsummary="${junit.printsummary}"
@@ -474,6 +475,7 @@
              showoutput="${junit.showoutput}"
              timeout="${junit.timeout}">
 
+         <sysproperty key="jbm.remoting.disable.invm" value="${disable.invm}" />
          <sysproperty key="remote" value="false"/>
          <sysproperty key="module.output" value="${tests.output}"/>
          <sysproperty key="test.bind.address" value="${test.bind.address}"/>




More information about the jboss-cvs-commits mailing list