geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r396533 - in /geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat: ConnectorGBean.java TomcatWebConnector.java
Date Mon, 24 Apr 2006 12:30:05 GMT
Author: hogstrom
Date: Mon Apr 24 05:30:00 2006
New Revision: 396533

URL: http://svn.apache.org/viewcvs?rev=396533&view=rev
Log:
GERONIMO-1901 Add additional parameters to TomcatGBean to provide improved configuration of
Tomcat Attributs

Added the ability to manipulate the following parameters:

      maxKeepAliveRequests="100"       maxKeepAliveRequests
      socketBuffer="9000"              socketBuffer
      useBodyEncodingForURI="false"    useBodyEncodingForURI

To manipulate these attributes modify the config.xml 

  <configuration name="geronimo/tomcat/1.1-SNAPSHOT/car">
    <gbean name="TomcatResources">
    </gbean>
    <gbean name="TomcatWebConnector">
      <attribute name="host">0.0.0.0</attribute>
      <attribute name="port">8080</attribute>
      <attribute name="redirectPort">8443</attribute>

      <-- These are the new attributes. (defaults shown) -->
      <attribute name="useBodyEncodingForURI">false</attribute>
      <attribute name="socketBuffer">9000</attribute>
      <attribute name="maxKeepAliveRequests">100</attribute>
    </gbean>



Modified:
    geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
    geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebConnector.java

Modified: geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java?rev=396533&r1=396532&r2=396533&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
(original)
+++ geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
Mon Apr 24 05:30:00 2006
@@ -429,6 +429,33 @@
         connector.setAttribute("maxSavePostSize", new Integer(kbytes));
     }
 
+    public int getMaxKeepAliveRequests() {
+        Object value = connector.getAttribute("maxKeepAliveRequests");
+        return value == null ? 100 : Integer.parseInt(value.toString());
+    }
+
+    public void setMaxKeepAliveRequests(int maxKeepAliveRequests) {
+        connector.setAttribute("maxKeepAliveRequests", new Integer(maxKeepAliveRequests));
+    }
+
+    public int getSocketBuffer() {
+        Object value = connector.getAttribute("socketBuffer");
+        return value == null ? 9000 : Integer.parseInt(value.toString());
+    }
+
+    public void setSocketBuffer(int kbytes) {
+        connector.setAttribute("socketBuffer", new Integer(kbytes));
+    }
+
+    public boolean getUseBodyEncodingForURI() {
+        Object value = connector.getAttribute("useBodyEncodingForURI");
+        return value == null ? false : Boolean.getBoolean(value.toString());
+    }
+
+    public void setUseBodyEncodingForURI(boolean enabled) {
+        connector.setAttribute("socketBuffer", new Boolean(enabled));
+    }
+
 
     public static final GBeanInfo GBEAN_INFO;
 
@@ -438,7 +465,7 @@
         infoFactory.addAttribute("protocol", String.class, true);
         infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addOperation("getInternalObject");
-        infoFactory.addInterface(TomcatWebConnector.class, new String[]{"host","port","bufferSizeBytes","maxThreads","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","minSpareThreads","maxSpareThreads","maxHttpHeaderSizeBytes","hostLookupEnabled","connectionTimeoutMillis","uploadTimeoutEnabled","connectUrl","maxPostSize","maxSavePostSize","emptySessionPath"},
+        infoFactory.addInterface(TomcatWebConnector.class, new String[]{"host","port","bufferSizeBytes","maxThreads","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","minSpareThreads","maxSpareThreads","maxHttpHeaderSizeBytes","hostLookupEnabled","connectionTimeoutMillis","uploadTimeoutEnabled","connectUrl","maxPostSize","maxSavePostSize","emptySessionPath",
"maxKeepAliveRequests", "socketBuffer", "useBodyEncodingForURI"},
                                                            new String[]{"host","port","redirectPort"});
         infoFactory.setConstructor(new String[] { "name", "protocol", "host", "port", "TomcatContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebConnector.java?rev=396533&r1=396532&r2=396533&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
(original)
+++ geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
Mon Apr 24 05:30:00 2006
@@ -28,4 +28,10 @@
     public void setConnectionTimeoutMillis(int millis);
     public boolean isUploadTimeoutEnabled();
     public void setUploadTimeoutEnabled(boolean enabled);
+    public int getSocketBuffer();
+    public void setSocketBuffer(int bytes);
+    public boolean getUseBodyEncodingForURI();
+    public void setUseBodyEncodingForURI(boolean enabled);
+    public int getMaxKeepAliveRequests();
+    public void setMaxKeepAliveRequests(int maxKeepAliveRequests);
 }



Mime
View raw message