[wsas-java-dev] svn commit r9786 - in
branches/wsas/java/2.1/wsas/java/modules/core: conf
src/org/wso2/wsas
svn at wso2.org
svn at wso2.org
Wed Nov 14 21:52:59 PST 2007
Author: azeez
Date: Wed Nov 14 21:52:52 2007
New Revision: 9786
Modified:
branches/wsas/java/2.1/wsas/java/modules/core/conf/server.xml
branches/wsas/java/2.1/wsas/java/modules/core/src/org/wso2/wsas/MainServlet.java
Log:
Adding a separate config entry for clustering host name
Modified: branches/wsas/java/2.1/wsas/java/modules/core/conf/server.xml
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/core/conf/server.xml (original)
+++ branches/wsas/java/2.1/wsas/java/modules/core/conf/server.xml Wed Nov 14 21:52:52 2007
@@ -35,14 +35,25 @@
<Version>@wso2wsas_version@</Version>
<!--
- Host name of the machine hosting this server
- e.g. www.wso2.org
+ Host name or IP address of the machine hosting this server
+ e.g. www.wso2.org, 192.168.1.10
+ This is will become part of the End Point Reference of the
+ services deployed on this server instance.
-->
<!--
<HostName>www.wso2.org</HostName>
-->
<!--
+ The host name or IP address which should be used by a node
+ when it is part of a cluster. This host name or IP address
+ will be used by a node to advertise itself when it joins a cluster.
+ -->
+ <!--
+ <ClusteringHostName>127.0.0.1</ClusteringHostName>
+ -->
+
+ <!--
Uncomment this section and provide the correct HTTP port
in the case of a generic server installation
-->
Modified: branches/wsas/java/2.1/wsas/java/modules/core/src/org/wso2/wsas/MainServlet.java
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/core/src/org/wso2/wsas/MainServlet.java (original)
+++ branches/wsas/java/2.1/wsas/java/modules/core/src/org/wso2/wsas/MainServlet.java Wed Nov 14 21:52:52 2007
@@ -212,8 +212,9 @@
System.setProperty(ServerConstants.DERBY_HOME,
new File(serverConfig.getFirstProperty(
"Database.Home")).getAbsolutePath());
- String hostName = ServerConfiguration.getInstance().getFirstProperty("HostName");
- if(hostName != null && hostName.trim().length() != 0){
+ String hostName = ServerConfiguration.getInstance().getFirstProperty("CluteringHostName");
+ if(System.getProperty("local.ip.address") == null &&
+ hostName != null && hostName.trim().length() != 0){
System.setProperty("local.ip.address", hostName); // TODO: This should be changed to System.setProperty(ClusteringConstants.LOCAL_IP_ADDRESS, hostName) once we switch back to the Axis2 trunk
}
serverManager.adminResourceBase = servletContext.getRealPath(".");
More information about the Wsas-java-dev
mailing list