tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/admin/connector connector.jsp
Date Fri, 29 Aug 2003 02:40:52 GMT
amyroh      2003/08/28 19:40:52

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        ApplicationResources_en.properties
               webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
                        AddConnectorAction.java ConnectorForm.java
                        EditConnectorAction.java SaveConnectorAction.java
               webapps/admin/connector connector.jsp
  Log:
  Update Admin with new connector properties including thread pool configuration.
  
  Revision  Changes    Path
  1.17      +3 -0      jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
  
  Index: ApplicationResources_en.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ApplicationResources_en.properties	25 Aug 2003 22:16:38 -0000	1.16
  +++ ApplicationResources_en.properties	29 Aug 2003 02:40:51 -0000	1.17
  @@ -127,6 +127,9 @@
   connector.milliseconds=milliseconds
   connector.max=Maximum
   connector.maxkeepalive=Max KeepAlive Requests
  +connector.maxspare=Max Spare Threads
  +connector.maxthreads=Max Threads
  +connector.minspare=Min Spare Threads
   connector.proxy.name=Proxy Name
   connector.proxy.portnumber=Proxy Port Number
   connector.algorithm=Algorithm
  
  
  
  1.5       +7 -4      jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java
  
  Index: AddConnectorAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AddConnectorAction.java	25 Aug 2003 22:16:38 -0000	1.4
  +++ AddConnectorAction.java	29 Aug 2003 02:40:51 -0000	1.5
  @@ -158,6 +158,9 @@
           connectorFm.setMinProcessorsText("5");
           connectorFm.setMaxProcessorsText("20");
           connectorFm.setMaxKeepAliveText("100");
  +        connectorFm.setMaxSpare("50");
  +        connectorFm.setMaxThreads("200");
  +        connectorFm.setMinSpare("4");
           connectorFm.setSecure("false");
           connectorFm.setTcpNoDelay("true");
           connectorFm.setXpoweredBy("false");
  
  
  
  1.5       +92 -19    jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java
  
  Index: ConnectorForm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConnectorForm.java	25 Aug 2003 22:16:38 -0000	1.4
  +++ ConnectorForm.java	29 Aug 2003 02:40:51 -0000	1.5
  @@ -188,6 +188,21 @@
       private String maxKeepAliveText = null;
       
       /**
  +     * The text for the maxSpare.
  +     */
  +    private String maxSpare = null;
  +    
  +    /**
  +     * The text for the maxThreads.
  +     */
  +    private String maxThreads = null;
  +    
  +    /**
  +     * The text for the minSpare.
  +     */
  +    private String minSpare = null;
  +    
  +    /**
        * The text for the port.
        */
       private String portText = null;
  @@ -824,7 +839,6 @@
           
       }
       
  -    
       /**
        * Set the maxKeepAliveText.
        */
  @@ -836,6 +850,63 @@
       }
       
       /**
  +     * Return the maxSpare.
  +     */
  +    public String getMaxSpare() {
  +        
  +        return this.maxSpare;
  +        
  +    }
  +    
  +    /**
  +     * Set the maxSpare.
  +     */
  +    
  +    public void setMaxSpare(String maxSpare) {
  +        
  +        this.maxSpare = maxSpare;
  +        
  +    } 
  +    
  +    /**
  +     * Return the maxThreads.
  +     */
  +    public String getMaxThreads() {
  +        
  +        return this.maxThreads;
  +        
  +    }
  +    
  +    /**
  +     * Set the maxThreads.
  +     */
  +    
  +    public void setMaxThreads(String maxThreads) {
  +        
  +        this.maxThreads = maxThreads;
  +        
  +    } 
  +    
  +    /**
  +     * Return the minSpare.
  +     */
  +    public String getMinSpare() {
  +        
  +        return this.minSpare;
  +        
  +    }
  +    
  +    /**
  +     * Set the minSpare.
  +     */
  +    
  +    public void setMinSpare(String minSpare) {
  +        
  +        this.minSpare = minSpare;
  +        
  +    }  
  +    
  +    /**
        * Return the port text.
        */
       public String getPortText() {
  @@ -986,6 +1057,9 @@
           this.minProcessorsText = null;
           this.maxProcessorsText = null;
           this.maxKeepAliveText = null;
  +        this.maxSpare = null;
  +        this.maxThreads = null;
  +        this.minSpare = null;
           this.portText = null;
           this.redirectPortText = null;
           this.proxyName = null;
  @@ -1020,11 +1094,6 @@
           String submit = request.getParameter("submit");
           // front end validation when save is clicked.
           //if (submit != null) {
  -            
  -            /* general */
  -            numberCheck("acceptCountText", acceptCountText, true, 0, 128);
  -            //numberCheck("connTimeOutText", connTimeOutText, true, -1, 60000);
  -            numberCheck("bufferSizeText", bufferSizeText, true, 1, 8192);
     
               /* The IP address can also be null -- which means open the
                server socket on *all* IP addresses for this host */
  @@ -1043,15 +1112,15 @@
               numberCheck("redirectPortText",  redirectPortText, true, -1, 65535);
               
               /* processors*/
  -            numberCheck("minProcessorsText",  minProcessorsText, true, 1, 512);
  -            try {
  +            //numberCheck("minProcessorsText",  minProcessorsText, true, 1, 512);
  +            //try {
                   // if min is a valid integer, then check that max >= min
  -                int min = Integer.parseInt(minProcessorsText);
  -                numberCheck("maxProcessorsText",  maxProcessorsText, true, min, 512);
  -            } catch (Exception e) {
  +                //int min = Integer.parseInt(minProcessorsText);
  +                //numberCheck("maxProcessorsText",  maxProcessorsText, true, min, 512);
  +            //} catch (Exception e) {
                   // check for the complete range
  -                numberCheck("maxProcessorsText",  maxProcessorsText, true, 1, 512);
  -            }
  +                //numberCheck("maxProcessorsText",  maxProcessorsText, true, 1, 512);
  +            //}
               
               // proxy                  
               if ((proxyName!= null) && (proxyName.length() > 0)) {
  @@ -1063,8 +1132,12 @@
               }   
               
               // supported only by Coyote HTTP and HTTPS connectors
  -            if (!("AJP".equalsIgnoreCase(connectorType)))
  -                numberCheck("proxyPortText",  proxyPortText, true, 0, 65535);         
  
  +            if (!("AJP".equalsIgnoreCase(connectorType))) {
  +                numberCheck("acceptCountText", acceptCountText, true, 0, 128);
  +                //numberCheck("connTimeOutText", connTimeOutText, true, -1, 60000);
  +                numberCheck("bufferSizeText", bufferSizeText, true, 1, 8192);
  +                numberCheck("proxyPortText",  proxyPortText, true, 0, 65535);  
  +            }
           //}
           
           return errors;
  
  
  
  1.3       +18 -9     jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
  
  Index: EditConnectorAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EditConnectorAction.java	25 Aug 2003 22:16:38 -0000	1.2
  +++ EditConnectorAction.java	29 Aug 2003 02:40:51 -0000	1.3
  @@ -228,7 +228,16 @@
                   ((String) mBServer.getAttribute(cname, attribute));          
               attribute = "maxKeepAliveRequests";
               connectorFm.setMaxKeepAliveText
  -                (((Integer) mBServer.getAttribute(cname, attribute)).toString());     
   
  +                (((Integer) mBServer.getAttribute(cname, attribute)).toString());     
 
  +            attribute = "maxSpareThreads";
  +            connectorFm.setMaxSpare
  +                ((String) mBServer.getAttribute(cname, attribute));         
  +            attribute = "maxThreads";
  +            connectorFm.setMaxThreads
  +                ((String) mBServer.getAttribute(cname, attribute));       
  +            attribute = "minSpareThreads";
  +            connectorFm.setMinSpare
  +                ((String) mBServer.getAttribute(cname, attribute));        
               attribute = "secure";
               connectorFm.setSecure
                   (((Boolean) mBServer.getAttribute(cname, attribute)).toString());;    
  
  @@ -249,11 +258,11 @@
               
               // Processors
               attribute = "minProcessors";
  -            connectorFm.setMinProcessorsText
  -                (((Integer) mBServer.getAttribute(cname, attribute)).toString());     
      
  +            //connectorFm.setMinProcessorsText
  +            //    (((Integer) mBServer.getAttribute(cname, attribute)).toString());   
        
               attribute = "maxProcessors";
  -            connectorFm.setMaxProcessorsText
  -                (((Integer) mBServer.getAttribute(cname, attribute)).toString());     
      
  +            //connectorFm.setMaxProcessorsText
  +            //    (((Integer) mBServer.getAttribute(cname, attribute)).toString());   
        
               
               // Supported by HTTP and HTTPS only
               if (!("AJP".equalsIgnoreCase(connectorType))) {
  
  
  
  1.8       +37 -8     jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java
  
  Index: SaveConnectorAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SaveConnectorAction.java	25 Aug 2003 22:16:38 -0000	1.7
  +++ SaveConnectorAction.java	29 Aug 2003 02:40:51 -0000	1.8
  @@ -357,8 +357,8 @@
               } catch (Throwable t) {
                   minProcessors = 5;
               }
  -            mBServer.setAttribute(coname,
  -                                  new Attribute("minProcessors", new Integer(minProcessors)));

  +            //mBServer.setAttribute(coname,
  +            //                      new Attribute("minProcessors", new Integer(minProcessors)));

               attribute = "maxProcessors";
               int maxProcessors = 20;
               try {
  @@ -366,8 +366,8 @@
               } catch (Throwable t) {
                   maxProcessors = 20;
               }
  -            mBServer.setAttribute(coname,
  -                                  new Attribute("maxProcessors", new Integer(maxProcessors)));

  +            //mBServer.setAttribute(coname,
  +            //                      new Attribute("maxProcessors", new Integer(maxProcessors)));

          
               attribute = "maxKeepAliveRequests";
               int maxKeepAliveRequests = 100;
  @@ -378,6 +378,35 @@
               }
               mBServer.setAttribute(coname,
                                     new Attribute("maxKeepAliveRequests", new Integer(maxKeepAliveRequests)));

  +            attribute = "maxSpareThreads";
  +            int maxSpare = 50;
  +            try {
  +                maxSpare = Integer.parseInt(cform.getMaxSpare());
  +            } catch (Throwable t) {
  +                maxSpare = 50;
  +            }
  +            mBServer.setAttribute(coname,
  +                                  new Attribute(attribute, (new Integer(maxSpare)).toString()));

  +            attribute = "maxThreads";
  +            int maxThreads = 200;
  +            try {
  +                maxThreads = Integer.parseInt(cform.getMaxThreads());
  +            } catch (Throwable t) {
  +                maxThreads = 200;
  +            }
  +            mBServer.setAttribute(coname,
  +                                  new Attribute(attribute, (new Integer(maxThreads)).toString()));

  +			
  +            attribute = "minSpareThreads";
  +            int minSpare = 4;
  +            try {
  +                minSpare = Integer.parseInt(cform.getMinSpare());
  +            } catch (Throwable t) {
  +                minSpare = 4;
  +            }
  +            mBServer.setAttribute(coname,
  +                                  new Attribute(attribute, (new Integer(minSpare)).toString()));

  +				  
               attribute = "secure";
               mBServer.setAttribute(coname,
                                     new Attribute("secure", new Boolean(cform.getSecure())));
   
  
  
  
  1.6       +85 -63    jakarta-tomcat-catalina/webapps/admin/connector/connector.jsp
  
  Index: connector.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/connector/connector.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- connector.jsp	25 Aug 2003 22:16:39 -0000	1.5
  +++ connector.jsp	29 Aug 2003 02:40:52 -0000	1.6
  @@ -96,7 +96,77 @@
           </controls:row>
        </logic:notEqual>
   
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="acceptCount">
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="debuglevel">
  +            <controls:label><bean:message key="server.debuglevel"/>:</controls:label>
  +            <controls:data>
  +               <html:select property="debugLvl" styleId="debuglevel">
  +                     <bean:define id="debugLvlVals" name="connectorForm" property="debugLvlVals"/>
  +                     <html:options collection="debugLvlVals" property="value"
  +                        labelProperty="label"/>
  +                </html:select>
  +            </controls:data>
  +        </controls:row>
  +
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="enableDNS">
  +            <controls:label><bean:message key="connector.enable.dns"/>:</controls:label>
  +            <controls:data>
  +                <html:select property="enableLookups" styleId="enableDNS">
  +                     <bean:define id="booleanVals" name="connectorForm" property="booleanVals"/>
  +                     <html:options collection="booleanVals" property="value"
  +                   labelProperty="label"/>
  +                </html:select>
  +            </controls:data>
  +        </controls:row>
  +
  +        <%-- Input only allowed on create transaction --%>
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="address">
  +            <controls:label><bean:message key="connector.address.ip"/>:</controls:label>
  +            <controls:data>
  +             <logic:equal name="connectorForm" property="adminAction" value="Create">
  +               <html:text property="address" size="20" styleId="address"/>
  +             </logic:equal>
  +             <logic:equal name="connectorForm" property="adminAction" value="Edit">
  +               &nbsp;<bean:write name="connectorForm" property="address"/>
  +               <html:hidden property="address"/>
  +             </logic:equal>
  +            </controls:data>
  +        </controls:row>
  +
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="secure">
  +            <controls:label><bean:message key="connector.secure"/>:</controls:label>
  +            <controls:data>
  +                <html:select property="secure" styleId="secure">
  +                     <bean:define id="booleanVals" name="connectorForm" property="booleanVals"/>
  +                     <html:options collection="booleanVals" property="value"
  +                   labelProperty="label"/>
  +                </html:select>
  +            </controls:data>
  +        </controls:row>
  +
  +        <%--controls:row header="true" labelStyle="table-header-text" dataStyle="table-header-text">
  +            <controls:label>Processors</controls:label>
  +            <controls:data>&nbsp;</controls:data>
  +        </controls:row>
  +
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="minProcessor">
  +            <controls:label><bean:message key="connector.min"/>:</controls:label>
  +            <controls:data>
  +               <html:text property="minProcessorsText" size="5" styleId="minProcessor"/>
  +            </controls:data>
  +        </controls:row>
  +
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="connectorMax">
  +            <controls:label><bean:message key="connector.max"/>:</controls:label>
  +            <controls:data>
  +               <html:text property="maxProcessorsText" size="5" styleId="connectorMax"/>
  +            </controls:data>
  +        </controls:row--%>
  +
  +<%-- The following properties are supported only for Coyote HTTP/S 1.1 Connectors --%>
  +
  +     <logic:notEqual name="connectorForm" property="connectorType" scope="session"
  +                  value="AJP">
  +       <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="acceptCount">
               <controls:label><bean:message key="connector.accept.count"/>:</controls:label>
               <controls:data>
                 <html:text property="acceptCountText" size="5" maxlength="5" styleId="acceptCount"/>
  @@ -134,17 +204,6 @@
               </controls:data>
           </controls:row>
   
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="debuglevel">
  -            <controls:label><bean:message key="server.debuglevel"/>:</controls:label>
  -            <controls:data>
  -               <html:select property="debugLvl" styleId="debuglevel">
  -                     <bean:define id="debugLvlVals" name="connectorForm" property="debugLvlVals"/>
  -                     <html:options collection="debugLvlVals" property="value"
  -                        labelProperty="label"/>
  -                </html:select>
  -            </controls:data>
  -        </controls:row>
  -
           <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="buffersize">
               <controls:label><bean:message key="connector.default.buffer"/>:</controls:label>
               <controls:data>
  @@ -163,46 +222,31 @@
               </controls:data>
           </controls:row>
   
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="enableDNS">
  -            <controls:label><bean:message key="connector.enable.dns"/>:</controls:label>
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="maxkeepalive">
  +            <controls:label><bean:message key="connector.maxkeepalive"/>:</controls:label>
               <controls:data>
  -                <html:select property="enableLookups" styleId="enableDNS">
  -                     <bean:define id="booleanVals" name="connectorForm" property="booleanVals"/>
  -                     <html:options collection="booleanVals" property="value"
  -                   labelProperty="label"/>
  -                </html:select>
  +              <html:text property="maxKeepAliveText" size="5" maxlength="5" styleId="maxkeepalive"/>
               </controls:data>
           </controls:row>
   
  -        <%-- Input only allowed on create transaction --%>
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="address">
  -            <controls:label><bean:message key="connector.address.ip"/>:</controls:label>
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="maxspare">
  +            <controls:label><bean:message key="connector.maxspare"/>:</controls:label>
               <controls:data>
  -             <logic:equal name="connectorForm" property="adminAction" value="Create">
  -               <html:text property="address" size="20" styleId="address"/>
  -             </logic:equal>
  -             <logic:equal name="connectorForm" property="adminAction" value="Edit">
  -               &nbsp;<bean:write name="connectorForm" property="address"/>
  -               <html:hidden property="address"/>
  -             </logic:equal>
  +              <html:text property="maxSpare" size="5" maxlength="5" styleId="maxspare"/>
               </controls:data>
           </controls:row>
  -
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="maxkeepalive">
  -            <controls:label><bean:message key="connector.maxkeepalive"/>:</controls:label>
  +	
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="maxkthreads">
  +            <controls:label><bean:message key="connector.maxthreads"/>:</controls:label>
               <controls:data>
  -              <html:text property="maxKeepAliveText" size="5" maxlength="5" styleId="maxkeepalive"/>
  +              <html:text property="maxThreads" size="5" maxlength="5" styleId="maxthreads"/>
               </controls:data>
           </controls:row>
   
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="secure">
  -            <controls:label><bean:message key="connector.secure"/>:</controls:label>
  +        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="minspare">
  +            <controls:label><bean:message key="connector.minspare"/>:</controls:label>
               <controls:data>
  -                <html:select property="secure" styleId="secure">
  -                     <bean:define id="booleanVals" name="connectorForm" property="booleanVals"/>
  -                     <html:options collection="booleanVals" property="value"
  -                   labelProperty="label"/>
  -                </html:select>
  +              <html:text property="minSpare" size="5" maxlength="5" styleId="minspare"/>
               </controls:data>
           </controls:row>
   
  @@ -227,6 +271,7 @@
                   </html:select>
               </controls:data>
           </controls:row>
  +     </logic:notEqual>
   
           <controls:row header="true" labelStyle="table-header-text" dataStyle="table-header-text">
               <controls:label>Ports</controls:label>
  @@ -255,28 +300,6 @@
           </controls:row>
   
           <controls:row header="true" labelStyle="table-header-text" dataStyle="table-header-text">
  -            <controls:label>Processors</controls:label>
  -            <controls:data>&nbsp;</controls:data>
  -        </controls:row>
  -
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="minProcessor">
  -            <controls:label><bean:message key="connector.min"/>:</controls:label>
  -            <controls:data>
  -               <html:text property="minProcessorsText" size="5" styleId="minProcessor"/>
  -            </controls:data>
  -        </controls:row>
  -
  -        <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="connectorMax">
  -            <controls:label><bean:message key="connector.max"/>:</controls:label>
  -            <controls:data>
  -               <html:text property="maxProcessorsText" size="5" styleId="connectorMax"/>
  -            </controls:data>
  -        </controls:row>
  -
  -<%-- The following properties are supported only for Coyote HTTP/S 1.1 Connectors --%>
  -     <logic:notEqual name="connectorForm" property="connectorType" scope="session"
  -                  value="AJP">
  -        <controls:row header="true" labelStyle="table-header-text" dataStyle="table-header-text">
               <controls:label>Proxy</controls:label>
               <controls:data>&nbsp;</controls:data>
           </controls:row>
  @@ -294,7 +317,6 @@
                   <html:text property="proxyPortText" size="5" styleId="portNumber"/>
               </controls:data>
           </controls:row>
  -        </logic:notEqual>
   
   <%-- The following properties are supported only on HTTPS Connector --%>
        <logic:equal name="connectorForm" property="scheme" scope="session"
  
  
  

Mime
View raw message