-
Enhancement
-
Resolution: Fixed
-
P3
-
6
-
b30
-
generic
-
generic
-
Verified
MXBeans map between arbitrary Java types and a fixed set of types in javax.management.openmbean called the Open Types. This allows clients to interact with the MXBeans, without need to know the original Java types (which might require putting extra jars in their classpath and so on).
Up until now, the mapping rules were fixed. Certain types can not be mapped by these rules, for example self-referential types or types such as Object or Number that actually represent several subclasses.
This is a proposal to allow customization of the mapping rules.
There are three sorts of use cases here:
1. You have some types that you control and that are used in your MXBean interfaces. For example, java.lang.management.MemoryUsage which is referenced by java.lang.management.MemoryMXBean. An update to java.lang.management could update MemoryUsage, for example to add an annotation to it.
2. You have some types that you do not control that are used in MXBean interfaces that you do control. For example, you are an end-user and you define an MXBean interface MyMemoryMXBean that references java.lang.management.MemoryUsage. You can't change MemoryUsage but you can change MyMemoryMXBean.
3. You have some types that you do not control that are used in MXBean interfaces that you do not control either. For example, you want to define an MXBean-ified version of some legacy MBeans defined by somebody else.
Up until now, the mapping rules were fixed. Certain types can not be mapped by these rules, for example self-referential types or types such as Object or Number that actually represent several subclasses.
This is a proposal to allow customization of the mapping rules.
There are three sorts of use cases here:
1. You have some types that you control and that are used in your MXBean interfaces. For example, java.lang.management.MemoryUsage which is referenced by java.lang.management.MemoryMXBean. An update to java.lang.management could update MemoryUsage, for example to add an annotation to it.
2. You have some types that you do not control that are used in MXBean interfaces that you do control. For example, you are an end-user and you define an MXBean interface MyMemoryMXBean that references java.lang.management.MemoryUsage. You can't change MemoryUsage but you can change MyMemoryMXBean.
3. You have some types that you do not control that are used in MXBean interfaces that you do not control either. For example, you want to define an MXBean-ified version of some legacy MBeans defined by somebody else.