Separate sequence increment from getter in ThreadPool to avoid
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Jul 2007 09:49:18 +0000 (09:49 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Jul 2007 09:49:18 +0000 (09:49 +0000)
misleading increments during monitoring via JMX.

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

java/org/apache/tomcat/util/threads/ThreadPool.java
webapps/docs/changelog.xml

index 8511203..aa9bf8b 100644 (file)
@@ -260,6 +260,10 @@ public class ThreadPool  {
     }
 
     public int getSequence() {
+        return sequence;
+    }
+
+    public int incSequence() {
         return sequence++;
     }
 
@@ -638,7 +642,7 @@ public class ThreadPool  {
             this.p = p;
             t = new ThreadWithAttributes(p, this);
             t.setDaemon(true);
-            t.setName(p.getName() + "-Processor" + p.getSequence());
+            t.setName(p.getName() + "-Processor" + p.incSequence());
             t.setPriority(p.getThreadPriority());
             p.addThread( t, this );
            noThData=true;
index 2a6b307..eb5e5d0 100644 (file)
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        Separate sequence increment from getter in ThreadPool to avoid
+        misleading increments during monitoring via JMX. (rjung)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Webapps">
     <changelog>
       <fix>