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

RFE: OpenMBeanNotificationInfo


    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-svc
    • Labels:


      javax.management.openmbean defines various OpenMBean*Info classes that restrict the corresponding MBean*Info classes so that they can only refer to Open Types. (More accurately, OpenMBeanAttributeInfo for example is an interface, implemented by OpenMBeanAttributeInfoSupport, which itself extends MBeanAttributeInfo.) However, there is no OpenMBeanNotificationInfo.

      The proposal would be to define an interface OpenMBeanNotificationInfo that includes all the methods from MBeanNotificationInfo, plus this one:
          public OpenType getUserDataType();
      The corresponding concrete class OpenMBeanNotificationInfoSupport would extend MBeanNotificationInfo and have the following constructor:
          public OpenMBeanNotificationInfoSupport(String[] notifTypes,
                                                  String description,
                                                  OpenType userDataType);

      The idea is that notifications emitted by an Open MBean should be constrained so that (1) they are always instances of javax.management.Notification and not a subclass; and (2) their userData (returned by Notification.getUserData()) is always an instance of the specified userDataType. This ensures, consistent with the idea of Open MBeans, that a client can always understand these notifications without requiring any additional Java classes.

      The various OpenMBean*InfoSupport classes are not final, but they probably should be, since if someone plugs a subclass of one of them into an Open MBean's MBeanInfo, that MBeanInfo will not be understandable by a client that does not know that class. (Serialization tricks with writeReplace are not enough because Java serialization is not the only way clients may interact with the MBean Server.) Compatibility rules forbid making the existing classes final, but the new class OpenMBeanNotificationInfoSupport probably should be.


          Issue Links



              • Assignee:
                sjiang Shanliang Jiang (Inactive)
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: