This content has been marked as final. Show 2 replies
There is an interesting thing on this subject that I could not explain to myself until I read more carefully
Just look to this code fragment:
ArrayList<MBeanServer> mbsn = MBeanServerFactory.findMBeanServer(null);
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
mbsn = MBeanServerFactory.findMBeanServer(null);
System.out.println(mbsn.isEmpty()" "+mbsn.size()+" "+mbs);+
and to its output:
false 1 com.sun.jmx.mbeanserver.JmxMBeanServer@a39137
The reason is that when I ran this piece of code the platform MBean server had not yet been started.
Starting it - and how - is under direct or indirect user control.
Edited by: mrsunnts on Feb 4, 2010 5:15 PM