ASF Bugzilla – Attachment 24341 Details for
Bug 47161
Manager ignores executors on status pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch V2
bug47161-v2.patch (text/plain), 2.77 KB, created by
Mark Thomas
on 2009-10-03 13:47:10 UTC
(
hide
)
Description:
Patch V2
Filename:
MIME Type:
Creator:
Mark Thomas
Created:
2009-10-03 13:47:10 UTC
Size:
2.77 KB
patch
obsolete
>Index: java/org/apache/tomcat/util/net/AprEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/AprEndpoint.java (revision 821397) >+++ java/org/apache/tomcat/util/net/AprEndpoint.java (working copy) >@@ -36,7 +36,6 @@ > import org.apache.tomcat.jni.SSLSocket; > import org.apache.tomcat.jni.Socket; > import org.apache.tomcat.jni.Status; >-import org.apache.tomcat.util.net.JIoEndpoint.Worker; > import org.apache.tomcat.util.res.StringManager; > > /** >@@ -188,7 +187,13 @@ > } > } > } >- public int getMaxThreads() { return maxThreads; } >+ public int getMaxThreads() { >+ if (executor != null) { >+ return -1; >+ } else { >+ return maxThreads; >+ } >+ } > > > /** >@@ -539,7 +544,7 @@ > * @return the amount of threads that are managed by the pool > */ > public int getCurrentThreadCount() { >- if (executor!=null) { >+ if (executor != null) { > return -1; > } else { > return curThreads; >Index: java/org/apache/tomcat/util/net/JIoEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/JIoEndpoint.java (revision 821397) >+++ java/org/apache/tomcat/util/net/JIoEndpoint.java (working copy) >@@ -160,7 +160,13 @@ > } > } > } >- public int getMaxThreads() { return maxThreads; } >+ public int getMaxThreads() { >+ if (executor != null) { >+ return -1; >+ } else { >+ return maxThreads; >+ } >+ } > > > /** >Index: java/org/apache/tomcat/util/net/NioEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/NioEndpoint.java (revision 821397) >+++ java/org/apache/tomcat/util/net/NioEndpoint.java (working copy) >@@ -57,7 +57,6 @@ > import org.apache.juli.logging.Log; > import org.apache.juli.logging.LogFactory; > import org.apache.tomcat.util.IntrospectionUtils; >-import org.apache.tomcat.util.net.JIoEndpoint.Worker; > import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler; > import org.apache.tomcat.util.net.jsse.NioX509KeyManager; > import org.apache.tomcat.util.res.StringManager; >@@ -371,7 +370,17 @@ > } > } > } >- public int getMaxThreads() { return maxThreads; } >+ public int getMaxThreads() { >+ if (running && getUseExecutor() && executor!=null) { >+ if (executor instanceof ThreadPoolExecutor) { >+ return ((ThreadPoolExecutor)executor).getMaximumPoolSize(); >+ } else { >+ return -1; >+ } >+ } else { >+ return maxThreads; >+ } >+ } > > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47161
:
24272
| 24341