00001 00025 package org.objectweb.jonas.management.j2eemanagement; 00026 00027 import javax.management.MBeanServerNotification; 00028 import javax.management.Notification; 00029 import javax.management.NotificationFilter; 00030 import javax.management.ObjectName; 00031 00037 public class ManagementMBeanFilter implements NotificationFilter { 00038 00045 public boolean isNotificationEnabled(Notification notif) { 00046 boolean result = false; 00047 if (notif instanceof MBeanServerNotification) { 00048 ObjectName name = ((MBeanServerNotification) notif).getMBeanName(); 00049 String onType = name.getKeyProperty("type"); 00050 String onServer = name.getKeyProperty("server"); 00051 if (onType != null && onType.equals("management") 00052 && onServer != null && onServer.equals("JOnAS")) { 00053 return true; 00054 } 00055 } 00056 return result; 00057 } 00058 }