Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Threads and Synchronization and the fly likes relationship between Executor and ThreadMXBean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "relationship between Executor and ThreadMXBean" Watch "relationship between Executor and ThreadMXBean" New topic
Author

relationship between Executor and ThreadMXBean

Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
If I use the PooledExecutor for running my threads and ThreadMXBean for monitoring and managing these threads, is there any realtionship between the two? In other words do I have to manually get the threads reference from PooledExecutor and monitor it in the ThreadMXBean. Both of these are new features in JDK1.5 but I am surprised that there is no connection between these two specific features.

Any suggestions/opinion is appreciated.

Thanks,
Basheer
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16695
    
  19

In this case, I believe it is a design issue. The MBean that monitors the threading system, monitors it at the thread system level. That is how it was designed.

I guess it wouldn't be that hard to develop another mbean that gets registered when thread pools are created. You just need some experience with JMX.

Henry
[ December 30, 2005: Message edited by: Henry Wong ]

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: relationship between Executor and ThreadMXBean
 
Similar Threads
Green and Native Threads
Unable to register MXBeans on MBeanServer in JBoss 4.2.3 (running on JDK 1.6)
Java Thread vs JMS Queue
Dividing a large list of items between threads
question about Doung Lea's thread pool