WAS v8.5 > Administering applications and their environment > Administering the Liberty profile > Administering the Liberty profile manually > Connect to the Liberty profile using JMX![]()
Working with JMX MBeans on the Liberty profile
This topic describes how to access the attributes and call the operations of Java™ Management Extensions (JMX) management beans (MBeans) on the Liberty profile. In addition, the topic lists the MBeans provided by the Liberty profile and shows the instructions on how to register our own MBeans from an application running on the Liberty profile.
The primary interfaces for interacting with MBeans on the Liberty profile are as following:
- javax.management.MBeanServer, which is for application code running on the Liberty profile.
- javax.management.MBeanServerConnection, which is for 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.
- 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. See Develop a JMX Java client for the Liberty profile.
See also
Liberty profile: List of provided MBeans
Liberty profile: Examples of accessing MBean attributes and operations
Liberty profile: Examples of registering MBeans
Parent topic: Connect to the Liberty profile using JMX