geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r947973 - in /geronimo/server/branches/3.0-M1/plugins/tomcat: geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java tomcat7/src/main/filtered-resources/tomcat-base/server.xml
Date Tue, 25 May 2010 09:12:36 GMT
Author: xuhaihong
Date: Tue May 25 09:12:36 2010
New Revision: 947973

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

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

Modified: geronimo/server/branches/3.0-M1/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M1/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java?rev=947973&r1=947972&r2=947973&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M1/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
(original)
+++ geronimo/server/branches/3.0-M1/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorWrapperGBeanStarter.java
Tue May 25 09:12:36 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;
@@ -87,7 +88,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);
@@ -135,7 +139,7 @@ public class ConnectorWrapperGBeanStarte
 
                 return annotationGbeanInfoFactory.getGBeanInfo(AJP13ConnectorGBean.class);
             }
-            
+
             if (className.equalsIgnoreCase("org.apache.coyote.ajp.AjpProtocol")) {
 
                 return annotationGbeanInfoFactory.getGBeanInfo(AJP13ConnectorGBean.class);

Modified: geronimo/server/branches/3.0-M1/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M1/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml?rev=947973&r1=947972&r2=947973&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M1/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
(original)
+++ geronimo/server/branches/3.0-M1/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
Tue May 25 09:12:36 2010
@@ -59,7 +59,7 @@
         -->
         <Connector name="TomcatWebConnector"
                    port="${HTTPPort + PortOffset}"
-                   host="${ServerHostname}"
+                   address="${ServerHostname}"
                    protocol="HTTP/1.1"
                    connectionTimeout="20000"
                    redirectPort="${HTTPSPort + PortOffset}"
@@ -77,7 +77,7 @@
    described in the APR documentation -->
         <Connector name="TomcatWebSSLConnector" 
                    port="${HTTPSPort + PortOffset}"
-                   host="${ServerHostname}"
+                   address="${ServerHostname}"
                    protocol="HTTP/1.1"
                    SSLEnabled="true"
                    maxThreads="150"
@@ -92,7 +92,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