user705414
user705414

Reputation: 21200

How to enumerate all the MBeans for a JDK?

I am wondering whether I can enumerate all the MBeans getting from ManagementFactory.getRuntimeMXBean?

Upvotes: 2

Views: 410

Answers (1)

Chris
Chris

Reputation: 23171

You can use the queryMBeans method on the MBeanServerConnection to list all the beans on a service (just pass null in for both parameters).

To do that using ManagementFactory, call ManagementFactory.getPlatformMBeanServer().queryMBeans(null,null);

Upvotes: 3

Related Questions