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

Pattern subscription in namespaces does not track MBean creation

    Details

      Description

      The new EventSubscriber class allows you to subscribe to an ObjectName pattern such as "*:type=Foo" in order to listen to all MBeans that match the pattern. Furthermore, it detects when a new MBean is created that matches the pattern, and will listen to that new MBean too. However, if the pattern is in a namespace, say "bar//*:type=Foo", then the subscription will be accepted and will correctly listen to all MBeans matching the pattern, but new MBeans that are created in the namespace will not be listened to.

      The problem is that MBean creation is discovered by subscribing to the MBeanServerDelegate, but that only emits notifications for the top-level namespace. When subscribing to "Bar//*:type=Foo", you need to subscribe to the MBeanServerDelegate in the Bar// namespace. (If there is none, then you cannot know when MBeans are created, other than by polling, and it is acceptable for new MBeans not to be listened to in that case.)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: