[Jboss-cvs] JBossAS SVN: r56820 - branches/Branch_4_0/system/src/main/org/jboss

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 13 18:09:33 EDT 2006


Author: bstansberry at jboss.com
Date: 2006-09-13 18:09:32 -0400 (Wed, 13 Sep 2006)
New Revision: 56820

Modified:
   branches/Branch_4_0/system/src/main/org/jboss/Main.java
Log:
[JBAS-3649] Set the new JGroups system properties

Modified: branches/Branch_4_0/system/src/main/org/jboss/Main.java
===================================================================
--- branches/Branch_4_0/system/src/main/org/jboss/Main.java	2006-09-13 21:00:46 UTC (rev 56819)
+++ branches/Branch_4_0/system/src/main/org/jboss/Main.java	2006-09-13 22:09:32 UTC (rev 56820)
@@ -323,6 +323,12 @@
                   value = arg.substring(i + 1, arg.length());
                }
                System.setProperty(name, value);
+               // Ensure setting the old bind.address property also sets the new
+               // jgroups.bind_addr property, otherwise jgroups may ignore it
+               if ("bind.address".equals(name))
+               {
+                  System.setProperty("jgroups.bind_addr", value);
+               }
                break;
             }
 
@@ -406,8 +412,20 @@
                arg = getopt.getOptarg();
                props.put(ServerConfig.SERVER_BIND_ADDRESS, arg);
                System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, arg);
-               // used by JGroups
-               System.setProperty("bind.address", arg);
+               // used by JGroups; only set if not set via -D so users
+               // can use a different interface for cluster communication
+               // There are 2 versions of this property, deprecated bind.address
+               // and the new version, jgroups.bind_addr
+               String bindAddress = System.getProperty("bind.address");
+               if (bindAddress == null)
+               {
+                  System.setProperty("bind.address", arg);
+               }
+               bindAddress = System.getProperty("jgroups.bind_addr");
+               if (bindAddress == null)
+               {
+                  System.setProperty("jgroups.bind_addr", arg);
+               }
                // Set the java.rmi.server.hostname if not set
                String rmiHost = System.getProperty("java.rmi.server.hostname");
                if( rmiHost == null )
@@ -425,6 +443,8 @@
                arg = getopt.getOptarg();
                props.put(ServerConfig.PARTITION_UDP_PROPERTY, arg);
                System.setProperty(ServerConfig.PARTITION_UDP_PROPERTY, arg);
+               // the new jgroups property name
+               System.setProperty("jgroups.udp.mcast_addr", arg);
                break;
             case 'l':
             {




More information about the jboss-cvs-commits mailing list