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

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@554587 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 a004ce3..a611f2e 100644 (file)
   <subsection name="Coyote">
     <changelog>
       <fix>
+        Separate sequence increment from getter in ThreadPool to avoid
+        misleading increments during monitoring via JMX. (rjung)
+      </fix>
+      <fix>
         Add back missing socketBuffer attribute in the java.io HTTP connector (remm)
       </fix>
     </changelog>