The difference between MBean and MXBean

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?
+43
java jmx mbeans
Apr 29 '13 at 9:25 am
source share
4 answers

MXBean is a special kind of MBean s. The main difference is that MXBean restricts data types so that they are "more compatible" with potential customers.

As an example: a MBean can expose attributes of the Foo data type. Now the client must also have this type of Foo in order to understand the attribute.

MXBean trying to restrict data types to those "already available" - java.lang.* , Etc.

See this tutorial

+41
Apr 29 '13 at 9:30
source share

MXBean is an MBean that is limited to open types, mostly primitive types, strings, and their compositions. Due to these limitations, MXBean can be used without loading classes, which makes them compatible even with non-Java clients. You can find the specification here: http://docs.oracle.com/javase/7/docs/api/javax/management/package-summary.html#package_description

+12
Apr 29 '13 at 9:33
source share

MBeans can be any of java objects in which we can store / retrieve Serializable/Externalizable objects using methods. Based on the design pattern used in objects, we can distinguish between standard (static) and dynamic. It is recommended that you maintain the interface class name with the MBean suffix

MXBeans refers only to a predefined set of types. It is recommended that you maintain the interface class name labeled MXBean . Implements the Dynamic or cusotmized JavaBean interface. Using MXBean, we can help any client use MBeans.

Contact MBean vs MXBean

+3
Apr 29 '13 at 9:30
source share

MBeans:

There may be any of the java objects in which we can store / retrieve Serializable / Externalizable objects using methods.

Based on the design pattern used in objects, we can distinguish between standard (static) and dynamic. It is recommended that you maintain an interface class name that is populated with an MBean.

MXBeans:

refers only to a predefined set of types. It is recommended that you maintain the interface class name populated by MXBean. Implements a dynamic or custom JavaBean interface.

Using MXBean, we can make it easy for any client to use MBeans. Additional information required to use MXBean.

See here

+2
Aug 21 '13 at 17:20
source share



All Articles