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" | name="jboss.example:name=NotificationListener"> | ... | <attribute name="SubscriptionList"> | <subscription-list> | ... | <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 --> | </filter> | </mbean> | ... | </subscription-list> | </attribute> | ... | </mbean> | For example: AttributeChangeNotificationFilterFactory 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"/> | </filter> | </mbean> | ... | MBeanServerNotificationFilterFactory 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"/> | </filter> | </mbean> | ... | This is all documented here: http://www.jboss.org/wiki/Wiki.jsp?page=SubscriptionList (and here, too) http://www.jboss.org/wiki/Wiki.jsp?page=ListenerServiceMBeanSupport http://www.jboss.org/wiki/Wiki.jsp?page=ExampleMinimalNotificationListener The update will be available from the next jboss releases, i.e. v3.2.8RC1, v.4.0.2RC1 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870183#3870183 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870183 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user