geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r559541 - /geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/
Date Wed, 25 Jul 2007 18:00:33 GMT
Author: jgenender
Date: Wed Jul 25 11:00:32 2007
New Revision: 559541

URL: http://svn.apache.org/viewvc?view=rev&rev=559541
Log:
Add initParams to all connectors to be able to set Tomcat values that are undocumented or
future impls

Modified:
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -19,6 +19,7 @@
 package org.apache.geronimo.tomcat.connector;
 
 import java.net.InetAddress;
+import java.util.Map;
 
 import javax.management.j2ee.statistics.Stats;
 
@@ -36,8 +37,8 @@
     private boolean reset = true;
 
 
-    public AJP13ConnectorGBean(String name, String address, int port, TomcatContainer container,
ServerInfo serverInfo) throws Exception {
-        super(name, "AJP/1.3", container, serverInfo);
+    public AJP13ConnectorGBean(String name, Map initParams, String address, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, "AJP/1.3", container, serverInfo);
         
         // Default the host to listen on all address is one was not specified
         if (address == null) {
@@ -192,7 +193,7 @@
                     "tomcatAuthentication", 
                 }
         );
-        infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer",
"ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "address", "port",
"TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -19,6 +19,7 @@
 package org.apache.geronimo.tomcat.connector;
 
 import java.net.InetAddress;
+import java.util.Map;
 
 import javax.management.j2ee.statistics.Stats;
 import javax.net.ssl.KeyManagerFactory;
@@ -43,8 +44,8 @@
 
     private boolean reset = true;
 
-    public BaseHttp11ConnectorGBean(String name, String protocol, String address, int port,
TomcatContainer container, ServerInfo serverInfo) throws Exception {
-        super(name, protocol, container, serverInfo);
+    public BaseHttp11ConnectorGBean(String name, Map initParams, String protocol, String
address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, protocol, container, serverInfo);
 
         // Default the host to listen on all address is one was not specified
         if (address == null) {
@@ -420,7 +421,7 @@
                     "truststoreType"
                 }
         );
-        infoFactory.setConstructor(new String[] { "name", "protocol", "address", "port",
"TomcatContainer", "ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "protocol", "address",
"port", "TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -18,6 +18,9 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.commons.logging.Log;
@@ -46,8 +49,12 @@
 
     private String name;
 
-    public ConnectorGBean(String name, String protocol, TomcatContainer container, ServerInfo
serverInfo) throws Exception {
-        super();
+    public ConnectorGBean(String name, Map initParams, String protocol, TomcatContainer container,
ServerInfo serverInfo) throws Exception {
+        
+        //Relief for new Tomcat-only parameters that may come in the future
+        if (initParams == null){
+            initParams = new HashMap();
+        }
 
         // Do we really need this?? For Tomcat I don't think so...
         // validateProtocol(protocol);
@@ -72,6 +79,8 @@
 
         // Create the Connector object
         connector = new Connector(protocol);
+        
+        setParameters(connector, initParams);
 
     }
 
@@ -247,6 +256,7 @@
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector",
ConnectorGBean.class);
 
         infoFactory.addAttribute("name", String.class, true);
+        infoFactory.addAttribute("initParams", Map.class, true);
         infoFactory.addAttribute("protocol", String.class, true);
         infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
@@ -291,7 +301,7 @@
                         "xpoweredBy"
                 }
         );
-        infoFactory.setConstructor(new String[] { "name", "protocol", "TomcatContainer",
"ServerInfo" });
+        infoFactory.setConstructor(new String[] { "name", "initParams", "protocol", "TomcatContainer",
"ServerInfo" });
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.util.Map;
+
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -25,15 +27,15 @@
 
 public class Http11ConnectorGBean extends BaseHttp11ConnectorGBean {
 
-    public Http11ConnectorGBean(String name, String address, int port, TomcatContainer container,
ServerInfo serverInfo) throws Exception {
-        super(name, "HTTP/1.1", address, port, container, serverInfo);
+    public Http11ConnectorGBean(String name, Map initParams, String address, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, "HTTP/1.1", address, port, container, serverInfo);
     }
 
     public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector",
Http11ConnectorGBean.class, BaseHttp11ConnectorGBean.GBEAN_INFO);
-        infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer",
"ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "address", "port",
"TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.util.Map;
+
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -25,8 +27,8 @@
 
 public class Http11NIOConnectorGBean extends BaseHttp11ConnectorGBean implements Http11NIOProtocol{
 
-    public Http11NIOConnectorGBean(String name, String address, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
-        super(name, "org.apache.coyote.http11.Http11NioProtocol", address, port, container,
serverInfo);
+    public Http11NIOConnectorGBean(String name,  Map initParams, String address, int port,
TomcatContainer container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, "org.apache.coyote.http11.Http11NioProtocol", address, port,
container, serverInfo);
     }
 
     public int getAcceptorThreadCount() {
@@ -411,7 +413,7 @@
 
                 }
         );
-        infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer",
"ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "address", "port",
"TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.util.Map;
+
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -25,8 +27,8 @@
 
 public class Https11ConnectorGBean extends Http11ConnectorGBean {
 
-    public Https11ConnectorGBean(String name, String address, int port, TomcatContainer container,
ServerInfo serverInfo) throws Exception {
-        super(name, address, port, container, serverInfo);
+    public Https11ConnectorGBean(String name, Map initParams, String address, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, address, port, container, serverInfo);
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
@@ -36,7 +38,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector",
Https11ConnectorGBean.class, Http11ConnectorGBean.GBEAN_INFO);
-        infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer",
"ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "address", "port",
"TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java?view=diff&rev=559541&r1=559540&r2=559541
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
Wed Jul 25 11:00:32 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.geronimo.tomcat.connector;
 
+import java.util.Map;
+
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -25,8 +27,8 @@
 
 public class Https11NIOConnectorGBean extends Http11NIOConnectorGBean {
 
-    public Https11NIOConnectorGBean(String name, String address, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
-        super(name, address, port, container, serverInfo);
+    public Https11NIOConnectorGBean(String name, Map initParams, String address, int port,
TomcatContainer container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, address, port, container, serverInfo);
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
@@ -36,7 +38,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector",
Https11NIOConnectorGBean.class, Http11NIOConnectorGBean.GBEAN_INFO);
-        infoFactory.setConstructor(new String[] { "name", "address", "port", "TomcatContainer",
"ServerInfo"});
+        infoFactory.setConstructor(new String[] { "name", "initParams", "address", "port",
"TomcatContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
     



Mime
View raw message