Difference between MBean and MXBean

java, jmx, mbeans

Solution

`MXBean`s are just a special kind of `MBean`s. The main difference is that `MXBean` restrict the data types, so that they are "more compatible" with potential clients.

As example: a `MBean` can expose attributes of a data type `Foo`. Now the client also needs to have this type `Foo` to make sense of the attribute.

The `MXBean` tries to restrict the data types to those "already available" - `java.lang.*` etc.

See this tutorial

Problem

I have the following questions regarding MBean and MXBean: - What is the difference between MBean and MXBean? - What are the use cases for MBean and MXBean?

Original source