Set not maxThreads but minSpareThreads to corePoolSize, if AbstractEndpoint.setMinSp...
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Oct 2010 09:19:00 +0000 (09:19 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Oct 2010 09:19:00 +0000 (09:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1005379 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/AbstractEndpoint.java
webapps/docs/changelog.xml

index eaffb64..59cb848 100644 (file)
@@ -233,7 +233,7 @@ public abstract class AbstractEndpoint {
         this.minSpareThreads = minSpareThreads;
         if (running && executor!=null) {
             if (executor instanceof java.util.concurrent.ThreadPoolExecutor) {
-                ((java.util.concurrent.ThreadPoolExecutor)executor).setCorePoolSize(maxThreads);
+                ((java.util.concurrent.ThreadPoolExecutor)executor).setCorePoolSize(minSpareThreads);
             } else if (executor instanceof ResizableExecutor) {
                 ((ResizableExecutor)executor).resizePool(minSpareThreads, maxThreads);
             }
index 3cc7a73..8df6917 100644 (file)
         <bug>50054</bug>: Correctly handle the setting of minSpareThreads in 
         AJP connector. (kfujino) 
       </fix>
+      <fix>
+        Set not maxThreads  but minSpareThreads to corePoolSize, if 
+        AbstractEndpoint.setMinSpareThreads is called. (kfujino) 
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">