Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49856
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 30 Sep 2010 21:47:46 +0000 (21:47 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 30 Sep 2010 21:47:46 +0000 (21:47 +0000)
Add an executorName attribute to Connectors so it is possible to trace ThreadPool to Connector to Executor via JMX.

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

java/org/apache/catalina/connector/Connector.java
java/org/apache/catalina/connector/mbeans-descriptors.xml
webapps/docs/changelog.xml

index f100a53..a3c9efe 100644 (file)
@@ -774,6 +774,15 @@ public class Connector extends LifecycleMBeanBase  {
         return useIPVHosts;
     }
 
+
+    public String getExecutorName() {
+        Object obj = protocolHandler.getExecutor();
+        if (obj instanceof org.apache.catalina.Executor) {
+            return ((org.apache.catalina.Executor) obj).getName();
+        }
+        return "Internal";
+    }
+
     // --------------------------------------------------------- Public Methods
 
 
index e14960f..738d546 100644 (file)
           description="The 'enable DNS lookups' flag for this Connector"
                  type="boolean"/>
 
+    <attribute   name="executorName"
+          description="The name of the executor - if any - associated with this Connector"
+                 type="java.lang.String"
+            writeable="false"/>
+
     <!-- Common -->
     <attribute   name="keepAliveTimeout"
           description="The number of seconds Tomcat will wait for a subsequent request before closing the connection"
index 0b6b885..2b8095e 100644 (file)
         and Tomcat 7. (markt)
       </fix>
       <fix>
+        <bug>49856</bug>: Add an executorName attribute to Connectors so it is
+        possible to trace ThreadPool to Connector to Executor via the JMX
+        interface. (markt)
+      </fix>
+      <fix>
         <bug>49865</bug>: Tomcat failed to start if catalina.properties was not
         present. (markt)
       </fix>