@Test
public void test() throws Exception {

    MBeanServer server = ManagementFactory.getPlatformMBeanServer();
    Set<ObjectName> objectNames = server.queryNames( null, null );
    for ( ObjectName name : objectNames ) {
        System.out.println( name.toString() );
        System.out.println( MBeans.map(server, name) );
    }
    //Set<ObjectInstance> instances = server.queryMBeans(null, null);
}