private Logger getModelMBeanLogger(String notificationType) throws MBeanException { // Get a copy to avoid synchronization ModelMBeanInfo info = getModelMBeanInfo(); // First look if there is a suitable notification descriptor, otherwise use MBean descriptor Descriptor descriptor = null; Logger modelMBeanLogger = null; if (notificationType != null) { descriptor = info.getDescriptor(notificationType, "notification"); modelMBeanLogger = findLogger(descriptor); } if (modelMBeanLogger == null) { descriptor = info.getMBeanDescriptor(); modelMBeanLogger = findLogger(descriptor); if (modelMBeanLogger != null) return modelMBeanLogger; } return null; }
try mbeanDescriptor = minfo.getDescriptor("", ModelMBeanConstants.MBEAN_DESCRIPTOR);
try mbeanDescriptor = minfo.getDescriptor("", ModelMBeanConstants.MBEAN_DESCRIPTOR);
protected void override(Invocation invocation) throws MBeanException { // Do we allow for dynamic descriptor changes if (dynamicResource && info != null) { Descriptor current = invocation.getDescriptor(); if (current != null) { ModelMBeanInfo mminfo = (ModelMBeanInfo) info; Descriptor descriptor = mminfo.getDescriptor((String) current.getFieldValue(NAME), (String) current.getFieldValue(DESCRIPTOR_TYPE)); if (descriptor != null) invocation.setDescriptor(descriptor); } } }
protected void override(Invocation invocation) throws MBeanException { // Do we allow for dynamic descriptor changes if (dynamicResource && info != null) { Descriptor current = invocation.getDescriptor(); if (current != null) { ModelMBeanInfo mminfo = (ModelMBeanInfo) info; Descriptor descriptor = mminfo.getDescriptor((String) current.getFieldValue(NAME), (String) current.getFieldValue(DESCRIPTOR_TYPE)); if (descriptor != null) invocation.setDescriptor(descriptor); } } }
private Logger getModelMBeanLogger(String notificationType) throws MBeanException { // Get a copy to avoid synchronization ModelMBeanInfo info = getModelMBeanInfo(); // First look if there is a suitable notification descriptor, otherwise use MBean descriptor Descriptor descriptor = null; Logger modelMBeanLogger = null; if (notificationType != null) { descriptor = info.getDescriptor(notificationType, "notification"); modelMBeanLogger = findLogger(descriptor); } if (modelMBeanLogger == null) { descriptor = info.getMBeanDescriptor(); modelMBeanLogger = findLogger(descriptor); if (modelMBeanLogger != null) return modelMBeanLogger; } return null; }
private Logger getModelMBeanLogger(String notificationType) throws MBeanException { // Get a copy to avoid synchronization ModelMBeanInfo info = getModelMBeanInfo(); // First look if there is a suitable notification descriptor, otherwise use MBean descriptor Descriptor descriptor = null; Logger modelMBeanLogger = null; if (notificationType != null) { descriptor = info.getDescriptor(notificationType, "notification"); modelMBeanLogger = findLogger(descriptor); } if (modelMBeanLogger == null) { descriptor = info.getMBeanDescriptor(); modelMBeanLogger = findLogger(descriptor); if (modelMBeanLogger != null) return modelMBeanLogger; } return null; }
try mbeanDescriptor = minfo.getDescriptor("", ModelMBeanConstants.MBEAN_DESCRIPTOR); String type = (String) mbeanDescriptor.getFieldValue(
try mbeanDescriptor = minfo.getDescriptor("", ModelMBeanConstants.MBEAN_DESCRIPTOR); String type = (String) mbeanDescriptor.getFieldValue(