Search in sources :

Example 1 with ConfigMBeanImpl

use of org.apache.karaf.config.core.impl.ConfigMBeanImpl in project karaf by apache.

the class Activator method doStart.

protected void doStart() throws Exception {
    ConfigurationAdmin configurationAdmin = getTrackedService(ConfigurationAdmin.class);
    if (configurationAdmin == null) {
        return;
    }
    ConfigRepository configRepository = new ConfigRepositoryImpl(configurationAdmin, new File(System.getProperty("karaf.etc")));
    register(ConfigRepository.class, configRepository);
    ConfigMBeanImpl configMBean = new ConfigMBeanImpl();
    configMBean.setConfigRepo(configRepository);
    registerMBean(configMBean, "type=config");
}
Also used : ConfigRepository(org.apache.karaf.config.core.ConfigRepository) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) File(java.io.File) ConfigRepositoryImpl(org.apache.karaf.config.core.impl.ConfigRepositoryImpl) ConfigMBeanImpl(org.apache.karaf.config.core.impl.ConfigMBeanImpl)

Aggregations

File (java.io.File)1 ConfigRepository (org.apache.karaf.config.core.ConfigRepository)1 ConfigMBeanImpl (org.apache.karaf.config.core.impl.ConfigMBeanImpl)1 ConfigRepositoryImpl (org.apache.karaf.config.core.impl.ConfigRepositoryImpl)1 ConfigurationAdmin (org.osgi.service.cm.ConfigurationAdmin)1