I'm not familiar with JDistro and can't say offhand what is happening here. JConsole can connect to its own MBeanServer (i.e. the
Platform MBeanServer) and see any MBeans there, including MBeans put there by someone else. To do this, use the Remote tab in the connection dialog and specify host localhost and port 0.
I used the following test program to check this. You need to compile and run with jconsole.jar and jtools.jar from the <JDK_HOME>/lib directory in your classpath.
import java.lang.management.*;
import javax.management.*;
import sun.tools.jconsole.*;
public class RunJConsole {
public static void main(String[] args) throws Exception {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
mbs.registerMBean(new MBeanServerDelegate(), new ObjectName("a:b=c"));
JConsole.main(new String[0]);
}
}
As usual with sun.* classes, there's no guarantee that this program will continue to work, because sun.* classes can change incompatibly between releases.
Posted by: emcmanus on September 30, 2005 at 01:05 AM