Add missing thread name in RequestProcessor when Servlet 3 Async
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jul 2011 14:33:12 +0000 (14:33 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jul 2011 14:33:12 +0000 (14:33 +0000)
is used.

Fixes null thread name in access log and probably JMX MBean.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1144865 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/CoyoteAdapter.java
webapps/docs/changelog.xml

index 36019f7..789ef8d 100644 (file)
@@ -269,6 +269,7 @@ public class CoyoteAdapter implements Adapter {
         boolean comet = false;
         boolean success = true;
         AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext();
+        req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
         try {
             if (!request.isAsync() && !comet) {
                 // Error or timeout - need to tell listeners the request is over
index 90aa4a7..8d64956 100644 (file)
       <fix>
         Fix regression in year number formatting for AccessLogValve. (rjung)
       </fix>
+      <fix>
+        Add missing thread name in RequestProcessor when Servlet 3 Async
+        is used. Fixes null thread name in access log and JMX MBean. (rjung)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">