Search in sources :

Example 1 with ConfigurationAdminMBean

use of org.osgi.jmx.service.cm.ConfigurationAdminMBean in project aries by apache.

the class ConfigurationAdminMBeanHandler method constructInjectMBean.

/**
 * @see org.apache.aries.jmx.AbstractCompendiumHandler#constructInjectMBean(java.lang.Object)
 */
@Override
protected StandardMBean constructInjectMBean(Object targetService) {
    ConfigurationAdminMBean caMBean = new org.apache.aries.jmx.cm.ConfigurationAdmin((org.osgi.service.cm.ConfigurationAdmin) targetService);
    StandardMBean mbean = null;
    try {
        mbean = new StandardMBean(caMBean, ConfigurationAdminMBean.class);
    } catch (NotCompliantMBeanException e) {
        Logger logger = agentContext.getLogger();
        logger.log(LogService.LOG_ERROR, "Failed to instantiate MBean for " + ConfigurationAdminMBean.class.getName(), e);
    }
    return mbean;
}
Also used : ConfigurationAdminMBean(org.osgi.jmx.service.cm.ConfigurationAdminMBean) StandardMBean(javax.management.StandardMBean) NotCompliantMBeanException(javax.management.NotCompliantMBeanException) Logger(org.apache.aries.jmx.Logger)

Aggregations

NotCompliantMBeanException (javax.management.NotCompliantMBeanException)1 StandardMBean (javax.management.StandardMBean)1 Logger (org.apache.aries.jmx.Logger)1 ConfigurationAdminMBean (org.osgi.jmx.service.cm.ConfigurationAdminMBean)1