[jboss-cvs] JBossAS SVN: r60949 - branches/Branch_4_2/system/src/main/org/jboss.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 27 12:05:01 EST 2007
Author: dimitris at jboss.org
Date: 2007-02-27 12:05:00 -0500 (Tue, 27 Feb 2007)
New Revision: 60949
Modified:
branches/Branch_4_2/system/src/main/org/jboss/Main.java
Log:
set the default java.rmi.server.hostname to 127.0.0.1, if not already set
Modified: branches/Branch_4_2/system/src/main/org/jboss/Main.java
===================================================================
--- branches/Branch_4_2/system/src/main/org/jboss/Main.java 2007-02-27 16:08:16 UTC (rev 60948)
+++ branches/Branch_4_2/system/src/main/org/jboss/Main.java 2007-02-27 17:05:00 UTC (rev 60949)
@@ -261,9 +261,17 @@
Getopt getopt = new Getopt(programName, args, sopts, lopts);
int code;
String arg;
+
// JBAS-4119, bind to localhost by default, instead of all NICs ("0.0.0.0")
props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
+
+ // Set the java.rmi.server.hostname if not set
+ if (System.getProperty("java.rmi.server.hostname") == null)
+ {
+ System.setProperty("java.rmi.server.hostname", "127.0.0.1");
+ }
+
while ((code = getopt.getopt()) != -1)
{
switch (code)
@@ -435,7 +443,7 @@
}
// Set the java.rmi.server.hostname if not set
String rmiHost = System.getProperty("java.rmi.server.hostname");
- if( rmiHost == null )
+ if (rmiHost == null)
{
rmiHost = ServerConfigUtil.fixRemoteAddress(arg);
System.setProperty("java.rmi.server.hostname", rmiHost);
More information about the jboss-cvs-commits
mailing list