geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r947971 - in /geronimo/server/branches/2.2/plugins/tomcat: geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java tomcat6/src/main/filtered-resources/tomcat-base/server.xml
Date Tue, 25 May 2010 09:11:26 GMT
Author: xuhaihong
Date: Tue May 25 09:11:26 2010
New Revision: 947971

URL: http://svn.apache.org/viewvc?rev=947971&view=rev
Log:
GERONIMO-5337 ServerHostName does not control the bind ip address for Tomcat Connectors

Modified:
    geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
    geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml

Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java?rev=947971&r1=947970&r2=947971&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
(original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
Tue May 25 09:11:26 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.net.InetAddress;
 import java.util.Set;
 
 import org.apache.catalina.connector.Connector;
@@ -86,7 +87,10 @@ public class ConnectorWrapperGBeanStarte
         GBeanData gbeanData = new GBeanData(name, gbeanInfo);
         gbeanData.setAttribute("name", uniqueName);
         gbeanData.setAttribute("connector", conn);
-        gbeanData.setAttribute("host", conn.getAttribute("address"));
+        Object addressProperty = conn.getAttribute("address");
+        if (addressProperty != null) {
+            gbeanData.setAttribute("host", addressProperty instanceof InetAddress ? ((InetAddress)
addressProperty).getHostAddress() : addressProperty.toString());
+        }
         gbeanData.setAttribute("port", conn.getPort());
 
         gbeanData.setReferencePattern(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE, containerAbstractName);

Modified: geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml?rev=947971&r1=947970&r2=947971&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
(original)
+++ geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
Tue May 25 09:11:26 2010
@@ -64,7 +64,7 @@
         -->
         <Connector name="TomcatWebConnector"
                    port="${HTTPPort + PortOffset}"
-                   host="${ServerHostname}"
+                   address="${ServerHostname}"
                    protocol="HTTP/1.1"
                    connectionTimeout="20000"
                    redirectPort="${HTTPSPort + PortOffset}"
@@ -82,7 +82,7 @@
    described in the APR documentation -->
         <Connector name="TomcatWebSSLConnector" 
                    port="${HTTPSPort + PortOffset}"
-                   host="${ServerHostname}"
+                   address="${ServerHostname}"
                    protocol="HTTP/1.1"
                    SSLEnabled="true"
                    maxThreads="150"
@@ -97,7 +97,7 @@
         <!-- Define an AJP 1.3 Connector on port 8009 -->
         <Connector name="TomcatAJPConnector"
                    port="${AJPPort + PortOffset}"
-                   host="${ServerHostname}"
+                   address="${ServerHostname}"
                    protocol="AJP/1.3"
                    redirectPort="${HTTPSPort + PortOffset}"
                    executor="DefaultThreadPool"/>



Mime
View raw message