Review differences in WebSphere MBeans

The managed beans (MBeans) available on Liberty are different than the MBeans available on WebSphere Application Server traditional. While the MBean domain is WebSphere on both servers, their object names and functionality are different between WebSphere Application Server traditional and Liberty.

For example, if you access the JVM MBean on WebSphere Application Server traditional with the WebSphere:*,type=JVM,j2eeType=JVM object name, you might be able to retrieve the information you need by accessing the JvmStats MXBean with the WebSphere:type=JvmStats object name on Liberty.

When you migrate your application from WebSphere Application Server traditional to Liberty, review your use of MBeans with a WebSphere domain to verify that the application receives the expected information. Because MBeans are accessed with ObjectName objects, this rule flags the following items:

For example, the tool flags the highlighted code:

public static final String EJB_ON = "WebSphere:*,type=Cluster";

ObjectName on = new ObjectName("WebSphere:*,type=Cluster");

ObjectName on = new ObjectName("WebSphere", "type", "Cluster");

ObjectName on = ObjectName.getInstance("WebSphere:*,type=Cluster");

If the tool determines that the object name does not use the WebSphere or wildcard (*) domain, the code is not flagged. For example, the following code that creates the ObjectName for a Java Runtime MBean is not flagged:

ObjectName on = new ObjectName("java.lang:type=Runtime");

For information about MBeans provided on Liberty, see the Liberty:List of provided MBeans.

For information about MBeans provided on WebSphere Application Server traditional, see the WebSphere Application Server Public MBean Interfaces.