- Remove usage of TWA (otherwise, executor support cannot work).
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 29 Apr 2006 00:23:12 +0000 (00:23 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 29 Apr 2006 00:23:12 +0000 (00:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@398045 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpAprProcessor.java
java/org/apache/coyote/ajp/AjpProcessor.java
java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11Processor.java
java/org/apache/tomcat/util/net/AprEndpoint.java
java/org/apache/tomcat/util/net/JIoEndpoint.java

index 7b070a2..bcd45e8 100644 (file)
@@ -41,7 +41,6 @@ import org.apache.tomcat.util.http.HttpMessages;
 import org.apache.tomcat.util.http.MimeHeaders;\r
 import org.apache.tomcat.util.net.AprEndpoint;\r
 import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
 \r
 \r
 /**\r
@@ -338,10 +337,7 @@ public class AjpAprProcessor implements ActionHook {
      */\r
     public boolean process(long socket)\r
         throws IOException {\r
-        ThreadWithAttributes thrA=\r
-                (ThreadWithAttributes)Thread.currentThread();\r
         RequestInfo rp = request.getRequestProcessor();\r
-        thrA.setCurrentStage(endpoint, "parsing http request");\r
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
 \r
         // Setting up the socket\r
@@ -405,11 +401,9 @@ public class AjpAprProcessor implements ActionHook {
             }\r
 \r
             // Setting up filters, and parse some request headers\r
-            thrA.setCurrentStage(endpoint, "prepareRequest");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
             try {\r
                 prepareRequest();\r
-                thrA.setParam(endpoint, request.requestURI());\r
             } catch (Throwable t) {\r
                 log.debug(sm.getString("ajpprocessor.request.prepare"), t);\r
                 // 400 - Internal Server Error\r
@@ -420,7 +414,6 @@ public class AjpAprProcessor implements ActionHook {
             // Process the request in the adapter\r
             if (!error) {\r
                 try {\r
-                    thrA.setCurrentStage(endpoint, "service");\r
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
                     adapter.service(request, response);\r
                 } catch (InterruptedIOException e) {\r
@@ -449,7 +442,6 @@ public class AjpAprProcessor implements ActionHook {
             }\r
             request.updateCounters();\r
 \r
-            thrA.setCurrentStage(endpoint, "ended");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
             recycle();\r
 \r
index a1f883d..faf8507 100644 (file)
@@ -41,7 +41,6 @@ import org.apache.tomcat.util.http.HttpMessages;
 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 class AjpProcessor implements ActionHook {
      */
     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 @@ public class AjpProcessor implements ActionHook {
             }
 
             // 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 @@ public class AjpProcessor implements ActionHook {
             // 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 @@ public class AjpProcessor implements ActionHook {
             }
             request.updateCounters();
 
-            thrA.setCurrentStage(endpoint, "ended");
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
             recycle();
 
index 955acb1..47267de 100644 (file)
@@ -53,7 +53,6 @@ import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.MimeHeaders;\r
 import org.apache.tomcat.util.net.AprEndpoint;\r
 import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
 \r
 \r
 /**\r
@@ -738,10 +737,7 @@ public class Http11AprProcessor implements ActionHook {
      */\r
     public boolean process(long socket)\r
         throws IOException {\r
-        ThreadWithAttributes thrA=\r
-                (ThreadWithAttributes)Thread.currentThread();\r
         RequestInfo rp = request.getRequestProcessor();\r
-        thrA.setCurrentStage(endpoint, "parsing http request");\r
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
 \r
         // Set the remote address\r
@@ -790,7 +786,6 @@ public class Http11AprProcessor implements ActionHook {
                     break;\r
                 }\r
                 request.setStartTime(System.currentTimeMillis());\r
-                thrA.setParam(endpoint, request.requestURI());\r
                 keptAlive = true;\r
                 if (!disableUploadTimeout) {\r
                     Socket.timeoutSet(socket, timeout * 1000);\r
@@ -809,7 +804,6 @@ public class Http11AprProcessor implements ActionHook {
             }\r
 \r
             // Setting up filters, and parse some request headers\r
-            thrA.setCurrentStage(endpoint, "prepareRequest");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
             try {\r
                 prepareRequest();\r
@@ -828,7 +822,6 @@ public class Http11AprProcessor implements ActionHook {
             // Process the request in the adapter\r
             if (!error) {\r
                 try {\r
-                    thrA.setCurrentStage(endpoint, "service");\r
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
                     adapter.service(request, response);\r
                     // Handle when the response was committed before a serious\r
@@ -853,7 +846,6 @@ public class Http11AprProcessor implements ActionHook {
 \r
             // Finish the handling of the request\r
             try {\r
-                thrA.setCurrentStage(endpoint, "endRequestIB");\r
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);\r
                 inputBuffer.endRequest();\r
             } catch (IOException e) {\r
@@ -865,7 +857,6 @@ public class Http11AprProcessor implements ActionHook {
                 error = true;\r
             }\r
             try {\r
-                thrA.setCurrentStage(endpoint, "endRequestOB");\r
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);\r
                 outputBuffer.endRequest();\r
             } catch (IOException e) {\r
@@ -882,7 +873,6 @@ public class Http11AprProcessor implements ActionHook {
             }\r
             request.updateCounters();\r
 \r
-            thrA.setCurrentStage(endpoint, "ended");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
 \r
             // Don't reset the param - we'll see it as ended. Next request\r
index 73e5a99..11cd2ec 100644 (file)
@@ -50,7 +50,6 @@ import org.apache.tomcat.util.http.MimeHeaders;
 import org.apache.tomcat.util.net.JIoEndpoint;\r
 import org.apache.tomcat.util.net.SSLSupport;\r
 import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
 \r
 \r
 /**\r
@@ -728,10 +727,7 @@ public class Http11Processor implements ActionHook {
      */\r
     public void process(Socket socket)\r
         throws IOException {\r
-        ThreadWithAttributes thrA=\r
-                (ThreadWithAttributes)Thread.currentThread();\r
         RequestInfo rp = request.getRequestProcessor();\r
-        thrA.setCurrentStage(endpoint, "parsing http request");\r
         rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
 \r
         // Set the remote address\r
@@ -787,7 +783,6 @@ public class Http11Processor implements ActionHook {
                 }\r
                 inputBuffer.parseRequestLine();\r
                 request.setStartTime(System.currentTimeMillis());\r
-                thrA.setParam( endpoint, request.requestURI() );\r
                 keptAlive = true;\r
                 if (!disableUploadTimeout) {\r
                     socket.setSoTimeout(timeout);\r
@@ -806,7 +801,6 @@ public class Http11Processor implements ActionHook {
             }\r
 \r
             // Setting up filters, and parse some request headers\r
-            thrA.setCurrentStage(endpoint, "prepareRequest");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
             try {\r
                 prepareRequest();\r
@@ -825,7 +819,6 @@ public class Http11Processor implements ActionHook {
             // Process the request in the adapter\r
             if (!error) {\r
                 try {\r
-                    thrA.setCurrentStage(endpoint, "service");\r
                     rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
                     adapter.service(request, response);\r
                     // Handle when the response was committed before a serious\r
@@ -850,7 +843,6 @@ public class Http11Processor implements ActionHook {
 \r
             // Finish the handling of the request\r
             try {\r
-                thrA.setCurrentStage(endpoint, "endRequestIB");\r
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);\r
                 inputBuffer.endRequest();\r
             } catch (IOException e) {\r
@@ -862,7 +854,6 @@ public class Http11Processor implements ActionHook {
                 error = true;\r
             }\r
             try {\r
-                thrA.setCurrentStage(endpoint, "endRequestOB");\r
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);\r
                 outputBuffer.endRequest();\r
             } catch (IOException e) {\r
@@ -879,7 +870,6 @@ public class Http11Processor implements ActionHook {
             }\r
             request.updateCounters();\r
 \r
-            thrA.setCurrentStage(endpoint, "ended");\r
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
 \r
             // Don't reset the param - we'll see it as ended. Next request\r
index 4b34802..96a58a9 100644 (file)
@@ -36,7 +36,6 @@ import org.apache.tomcat.jni.SSLSocket;
 import org.apache.tomcat.jni.Socket;\r
 import org.apache.tomcat.jni.Status;\r
 import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
 \r
 /**\r
  * APR tailored thread pool, providing the following services:\r
@@ -1325,7 +1324,7 @@ public class AprEndpoint {
          * Start the background processing thread.\r
          */\r
         public void start() {\r
-            thread = new ThreadWithAttributes(AprEndpoint.this, this);\r
+            thread = new Thread(this);\r
             thread.setName(getName() + "-" + (++curThreads));\r
             thread.setDaemon(true);\r
             thread.start();\r
index 38cee5e..e502a3a 100644 (file)
@@ -26,7 +26,6 @@ import java.util.concurrent.Executor;
 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 @@ public class JIoEndpoint {
          * 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();