Author: remm
Date: Fri Apr 28 17:23:12 2006
New Revision: 398045

URL: http://svn.apache.org/viewcvs?rev=398045&view=rev
Log:
- Remove usage of TWA (otherwise, executor support cannot work).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Fri 
Apr 28 17:23:12 2006
@@ -41,7 +41,6 @@
 import org.apache.tomcat.util.http.MimeHeaders;
 import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 
 /**
@@ -338,10 +337,7 @@
      */
     public boolean process(long socket)
         throws IOException {
-        ThreadWithAttributes thrA=
-                (ThreadWithAttributes)Thread.currentThread();
         RequestInfo rp = request.getRequestProcessor();
-        thrA.setCurrentStage(endpoint, "parsing http request");
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
 
         // Setting up the socket
@@ -405,11 +401,9 @@
             }
 
             // Setting up filters, and parse some request headers
-            thrA.setCurrentStage(endpoint, "prepareRequest");
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
             try {
                 prepareRequest();
-                thrA.setParam(endpoint, request.requestURI());
             } catch (Throwable t) {
                 log.debug(sm.getString("ajpprocessor.request.prepare"), t);
                 // 400 - Internal Server Error
@@ -420,7 +414,6 @@
             // Process the request in the adapter
             if (!error) {
                 try {
-                    thrA.setCurrentStage(endpoint, "service");
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
                     adapter.service(request, response);
                 } catch (InterruptedIOException e) {
@@ -449,7 +442,6 @@
             }
             request.updateCounters();
 
-            thrA.setCurrentStage(endpoint, "ended");
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
             recycle();
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Fri Apr 
28 17:23:12 2006
@@ -41,7 +41,6 @@
 import org.apache.tomcat.util.http.MimeHeaders;
 import org.apache.tomcat.util.net.JIoEndpoint;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 
 /**
@@ -326,10 +325,7 @@
      */
     public boolean process(Socket socket)
         throws IOException {
-        ThreadWithAttributes thrA=
-                (ThreadWithAttributes)Thread.currentThread();
         RequestInfo rp = request.getRequestProcessor();
-        thrA.setCurrentStage(endpoint, "parsing http request");
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
 
         // Setting up the socket
@@ -382,11 +378,9 @@
             }
 
             // Setting up filters, and parse some request headers
-            thrA.setCurrentStage(endpoint, "prepareRequest");
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
             try {
                 prepareRequest();
-                thrA.setParam(endpoint, request.requestURI());
             } catch (Throwable t) {
                 log.debug(sm.getString("ajpprocessor.request.prepare"), t);
                 // 400 - Internal Server Error
@@ -397,7 +391,6 @@
             // Process the request in the adapter
             if (!error) {
                 try {
-                    thrA.setCurrentStage(endpoint, "service");
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
                     adapter.service(request, response);
                 } catch (InterruptedIOException e) {
@@ -426,7 +419,6 @@
             }
             request.updateCounters();
 
-            thrA.setCurrentStage(endpoint, "ended");
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
             recycle();
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
Fri Apr 28 17:23:12 2006
@@ -53,7 +53,6 @@
 import org.apache.tomcat.util.http.MimeHeaders;
 import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 
 /**
@@ -738,10 +737,7 @@
      */
     public boolean process(long socket)
         throws IOException {
-        ThreadWithAttributes thrA=
-                (ThreadWithAttributes)Thread.currentThread();
         RequestInfo rp = request.getRequestProcessor();
-        thrA.setCurrentStage(endpoint, "parsing http request");
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
 
         // Set the remote address
@@ -790,7 +786,6 @@
                     break;
                 }
                 request.setStartTime(System.currentTimeMillis());
-                thrA.setParam(endpoint, request.requestURI());
                 keptAlive = true;
                 if (!disableUploadTimeout) {
                     Socket.timeoutSet(socket, timeout * 1000);
@@ -809,7 +804,6 @@
             }
 
             // Setting up filters, and parse some request headers
-            thrA.setCurrentStage(endpoint, "prepareRequest");
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
             try {
                 prepareRequest();
@@ -828,7 +822,6 @@
             // Process the request in the adapter
             if (!error) {
                 try {
-                    thrA.setCurrentStage(endpoint, "service");
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
                     adapter.service(request, response);
                     // Handle when the response was committed before a serious
@@ -853,7 +846,6 @@
 
             // Finish the handling of the request
             try {
-                thrA.setCurrentStage(endpoint, "endRequestIB");
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
                 inputBuffer.endRequest();
             } catch (IOException e) {
@@ -865,7 +857,6 @@
                 error = true;
             }
             try {
-                thrA.setCurrentStage(endpoint, "endRequestOB");
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);
                 outputBuffer.endRequest();
             } catch (IOException e) {
@@ -882,7 +873,6 @@
             }
             request.updateCounters();
 
-            thrA.setCurrentStage(endpoint, "ended");
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
 
             // Don't reset the param - we'll see it as ended. Next request

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Fri 
Apr 28 17:23:12 2006
@@ -50,7 +50,6 @@
 import org.apache.tomcat.util.net.JIoEndpoint;
 import org.apache.tomcat.util.net.SSLSupport;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 
 /**
@@ -728,10 +727,7 @@
      */
     public void process(Socket socket)
         throws IOException {
-        ThreadWithAttributes thrA=
-                (ThreadWithAttributes)Thread.currentThread();
         RequestInfo rp = request.getRequestProcessor();
-        thrA.setCurrentStage(endpoint, "parsing http request");
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
 
         // Set the remote address
@@ -787,7 +783,6 @@
                 }
                 inputBuffer.parseRequestLine();
                 request.setStartTime(System.currentTimeMillis());
-                thrA.setParam( endpoint, request.requestURI() );
                 keptAlive = true;
                 if (!disableUploadTimeout) {
                     socket.setSoTimeout(timeout);
@@ -806,7 +801,6 @@
             }
 
             // Setting up filters, and parse some request headers
-            thrA.setCurrentStage(endpoint, "prepareRequest");
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
             try {
                 prepareRequest();
@@ -825,7 +819,6 @@
             // Process the request in the adapter
             if (!error) {
                 try {
-                    thrA.setCurrentStage(endpoint, "service");
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
                     adapter.service(request, response);
                     // Handle when the response was committed before a serious
@@ -850,7 +843,6 @@
 
             // Finish the handling of the request
             try {
-                thrA.setCurrentStage(endpoint, "endRequestIB");
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
                 inputBuffer.endRequest();
             } catch (IOException e) {
@@ -862,7 +854,6 @@
                 error = true;
             }
             try {
-                thrA.setCurrentStage(endpoint, "endRequestOB");
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);
                 outputBuffer.endRequest();
             } catch (IOException e) {
@@ -879,7 +870,6 @@
             }
             request.updateCounters();
 
-            thrA.setCurrentStage(endpoint, "ended");
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
 
             // Don't reset the param - we'll see it as ended. Next request

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri 
Apr 28 17:23:12 2006
@@ -36,7 +36,6 @@
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 /**
  * APR tailored thread pool, providing the following services:
@@ -1325,7 +1324,7 @@
          * Start the background processing thread.
          */
         public void start() {
-            thread = new ThreadWithAttributes(AprEndpoint.this, this);
+            thread = new Thread(this);
             thread.setName(getName() + "-" + (++curThreads));
             thread.setDaemon(true);
             thread.start();

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=398045&r1=398044&r2=398045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Fri 
Apr 28 17:23:12 2006
@@ -26,7 +26,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 /**
  * Handle incoming TCP connections.
@@ -463,7 +462,7 @@
          * Start the background processing thread.
          */
         public void start() {
-            thread = new ThreadWithAttributes(JIoEndpoint.this, this);
+            thread = new Thread(this);
             thread.setName(getName() + "-" + (++curThreads));
             thread.setDaemon(true);
             thread.start();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to