[jboss-cvs] JBossAS SVN: r66867 - trunk/main/src/main/org/jboss.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 8 11:23:50 EST 2007
Author: adrian at jboss.org
Date: 2007-11-08 11:23:49 -0500 (Thu, 08 Nov 2007)
New Revision: 66867
Modified:
trunk/main/src/main/org/jboss/Main.java
Log:
[JBAS-4954] - JBoss should bind to localhost by default
Modified: trunk/main/src/main/org/jboss/Main.java
===================================================================
--- trunk/main/src/main/org/jboss/Main.java 2007-11-08 16:06:13 UTC (rev 66866)
+++ trunk/main/src/main/org/jboss/Main.java 2007-11-08 16:23:49 UTC (rev 66867)
@@ -281,8 +281,8 @@
Getopt getopt = new Getopt(programName, args, sopts, lopts);
int code;
String arg;
- props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "0.0.0.0");
- System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "0.0.0.0");
+ props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
+ System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
while ((code = getopt.getopt()) != -1)
{
switch (code)
@@ -502,11 +502,14 @@
}
}
- // JBAS-4119, set the java.rmi.server.hostname if not set
+ // Fix up other bind addresses
+ String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
if (System.getProperty("java.rmi.server.hostname") == null)
- {
- System.setProperty("java.rmi.server.hostname", "127.0.0.1");
- }
+ System.setProperty("java.rmi.server.hostname", bindAddress);
+ if (System.getProperty("bind.address") == null)
+ System.setProperty("bind.address", bindAddress);
+ if (System.getProperty("jgroups.bind_addr") == null)
+ System.setProperty("jgroups.bind_addr", bindAddress);
}
/**
@@ -560,4 +563,4 @@
return name.endsWith(".jar");
}
}
-}
\ No newline at end of file
+}
More information about the jboss-cvs-commits
mailing list