[Jboss-cvs] JBossAS SVN: r56818 - trunk/system/src/main/org/jboss
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 13 16:37:45 EDT 2006
Author: bstansberry at jboss.com
Date: 2006-09-13 16:37:44 -0400 (Wed, 13 Sep 2006)
New Revision: 56818
Modified:
trunk/system/src/main/org/jboss/Main.java
Log:
[JBAS-3649] Set the new JGroups system properties
Modified: trunk/system/src/main/org/jboss/Main.java
===================================================================
--- trunk/system/src/main/org/jboss/Main.java 2006-09-13 20:28:28 UTC (rev 56817)
+++ trunk/system/src/main/org/jboss/Main.java 2006-09-13 20:37:44 UTC (rev 56818)
@@ -344,6 +344,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;
}
@@ -427,8 +433,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 )
@@ -446,6 +464,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