1 25 package org.objectweb.jonas.management.j2eemanagement; 26 27 import javax.management.MBeanServerNotification ; 28 import javax.management.Notification ; 29 import javax.management.NotificationFilter ; 30 import javax.management.ObjectName ; 31 32 37 public class ManagementMBeanFilter implements NotificationFilter { 38 39 45 public boolean isNotificationEnabled(Notification notif) { 46 boolean result = false; 47 if (notif instanceof MBeanServerNotification ) { 48 ObjectName name = ((MBeanServerNotification ) notif).getMBeanName(); 49 String onType = name.getKeyProperty("type"); 50 String onServer = name.getKeyProperty("server"); 51 if (onType != null && onType.equals("management") 52 && onServer != null && onServer.equals("JOnAS")) { 53 return true; 54 } 55 } 56 return result; 57 } 58 } | Popular Tags |