Example usage for javax.management NotCompliantMBeanException getMessage

List of usage examples for javax.management NotCompliantMBeanException getMessage

Introduction

In this page you can find the example usage for javax.management NotCompliantMBeanException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:org.openadaptor.spring.SpringAdaptor.java

private static void attemptToRegisterBean(Object bean, MBeanServer mbeanServer, String beanName) {
    if (!(bean instanceof MBeanServer)) {
        try {/*from  w  w  w . j  av  a2 s .c om*/
            ObjectName name = new ObjectName("openadaptor:id=" + beanName);
            mbeanServer.registerMBean(bean, name);
            log.info("registered bean " + beanName);
        } catch (NotCompliantMBeanException e) {
            log.debug("bean " + beanName + " is not compliant : " + e.getMessage());
        } catch (Exception e) {
            log.error("failed to register mbean " + beanName, e);
        }
    }
}