Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6562936

Support custom type mappings in MXBeans

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: core-svc
    • Subcomponent:
    • Resolved In Build:
      b30
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              emcmanus Eamonn McManus
              Reporter:
              emcmanus Eamonn McManus
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: