Work with JMX MBeans on the Liberty profile
The primary interfaces for interacting with MBeans on the Liberty profile :
javax.management.MBeanServer Application code running on the Liberty profile. javax.management.MBeanServerConnection External code running in a separate Java virtual machine.
We can use an instance of either of these interfaces to access the attributes and call the operations of MBeans.
To access MBeans run...
/java/bin/jconsole.sh
Then click on the MBeans tab.
For application code running on the Liberty profile, we can use a javax.management.MBeanServer instance using the following code:
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
...
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
...For external code running in a separate Java virtual machine, we can use a javax.management.MBeanServerConnection instance.
Subtopics
- List of provided MBeans
- Examples of accessing MBean attributes and operations
- Examples of registering MBeans
- Example of setting up a JMX routing environment
Develop a JMX Java client
Parent topic: Access local and JMX REST connectors