tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfarc...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteResponse.java
Date Wed, 15 Oct 2003 18:47:49 GMT
jfarcand    2003/10/15 11:47:49

  Modified:    catalina/src/share/org/apache/catalina Wrapper.java
               catalina/src/share/org/apache/catalina/core
                        StandardWrapper.java StandardWrapperValve.java
               catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteResponse.java
  Log:
  Better increment the error count value by incrementing the count everytime sendError is
invoked
  
  Revision  Changes    Path
  1.3       +10 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Wrapper.java
  
  Index: Wrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Wrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Wrapper.java	29 Jan 2003 12:41:47 -0000	1.2
  +++ Wrapper.java	15 Oct 2003 18:47:49 -0000	1.3
  @@ -290,6 +290,12 @@
   
   
       /**
  +     * Increment the error count value used when monitoring.
  +     */
  +    public void incrementErrorCount();
  +
  +
  +    /**
        * Load and initialize an instance of this servlet, if there is not already
        * at least one initialized instance.  This can be used, for example, to
        * load servlets that are marked in the deployment descriptor to be loaded
  
  
  
  1.34      +11 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- StandardWrapper.java	24 Sep 2003 06:56:21 -0000	1.33
  +++ StandardWrapper.java	15 Oct 2003 18:47:49 -0000	1.34
  @@ -1424,6 +1424,13 @@
              swValve.setErrorCount(errorCount);
       }
   
  +    /**
  +     * Increment the error count used for monitoring.
  +     */
  +    public void incrementErrorCount(){
  +        swValve.setErrorCount(swValve.getErrorCount() + 1);
  +    }
  +
       public long getLoadTime() {
           return loadTime;
       }
  
  
  
  1.23      +1 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
  
  Index: StandardWrapperValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardWrapperValve.java	2 Sep 2003 21:22:04 -0000	1.22
  +++ StandardWrapperValve.java	15 Oct 2003 18:47:49 -0000	1.23
  @@ -442,7 +442,6 @@
        */
       private void exception(Request request, Response response,
                              Throwable exception) {
  -        errorCount++;
           ServletRequest sreq = request.getRequest();
           sreq.setAttribute(Globals.EXCEPTION_ATTR, exception);
   
  
  
  
  1.10      +10 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CoyoteResponse.java	19 Sep 2003 22:03:07 -0000	1.9
  +++ CoyoteResponse.java	15 Oct 2003 18:47:49 -0000	1.10
  @@ -90,6 +90,7 @@
   import org.apache.catalina.Connector;
   import org.apache.catalina.Context;
   import org.apache.catalina.HttpResponse;
  +import org.apache.catalina.Wrapper;
   import org.apache.catalina.util.CharsetMapper;
   import org.apache.catalina.util.DateTool;
   import org.apache.catalina.util.StringManager;
  @@ -1149,6 +1150,11 @@
           // Ignore any call from an included servlet
           if (included)
               return; 
  +
  +        Wrapper wrapper = getRequest().getWrapper();
  +        if (wrapper != null) {
  +            wrapper.incrementErrorCount();
  +        } 
   
           setError();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message