How do I get a reference to the Tomcat Executor instances running within the web app? I need this so I 开发者_Python百科can query basic information, such as thread pool size and utilization.
Not a direct answer but I'd recommend to use JMX for this. To get a list of MBeans
matching various criteria, use the MBeanServerConnection.queryNames()
method. For example, to return a list of all the ThreadPool
MBeans, use queryNames(new ObjectName("Catalina:type=ThreadPool,*", null))
.
精彩评论