0 Replies Latest reply on Mar 15, 2005 9:01 AM by Dimitris Andreadis

    Arbitrary JMX NotificationFilter(s) in ListenerServiceMBeanS

    Dimitris Andreadis Master

      The filtering mechanism that supported only a "fixed" NotificationFilterSupport filter has been extended to support arbitrary filters, using a filter factory plugin mechanism. To activate this feature use the following configuration syntax:

      <mbean code="some-ListenerServiceMBeanSupport-base-subclass"
       <attribute name="SubscriptionList">
       <mbean name="...">
       <!-- assign an arbitrary filter to this subscription -->
       <filter factory="filter-factory-class-name">
       <!-- configuration of the filter is different -->
       <!-- depending on the chosen factory -->

      For example:

      This filter factory creates AttributeChangeNotificationFilters, configured to filter-in AttributeChangeNotifications for particular mbean attributes. For example, if you want to receive "State" change notifications from all mbeans in the jboss.system domain, use:
       <mbean name="jboss.system:*">
       <filter factory="AttributeChangeNotificationFilterFactory">
       <enable attribute-name="State"/>

      This filter factory is really meant for filtering notifications from the MBeanServerDelegate mbean. Its primary purpose is to let you receive registration and/or unregistration notifications for selected ObjectNames (i.e. mbean instances). You need to configure both the notification types and the object names you are interested in. For example:
       <!-- filter in both JMX.mbean.registered & JMX.mbean.unregistered -->
       <mbean name="JMImplementation:type=MBeanServerDelegate">
       <filter factory="MBeanServerNotificationFilterFactory">
       <enable type="JMX.mbean.registered"/>
       <enable object-name="mydomain:name=somembean"/>
       <enable object-name="mydomain:name=anothermbean"/>

      This is all documented here:

      (and here, too)

      The update will be available from the next jboss releases, i.e. v3.2.8RC1, v.4.0.2RC1