Search in sources :

Example 1 with JdbcMBeanImpl

use of org.apache.karaf.jdbc.internal.JdbcMBeanImpl in project karaf by apache.

the class Activator method doStart.

@Override
protected void doStart() throws Exception {
    ConfigurationAdmin configurationAdmin = getTrackedService(ConfigurationAdmin.class);
    JdbcServiceImpl service = new JdbcServiceImpl();
    service.setBundleContext(bundleContext);
    service.setConfigAdmin(configurationAdmin);
    register(JdbcService.class, service);
    JdbcMBeanImpl mbean = new JdbcMBeanImpl();
    mbean.setJdbcService(service);
    registerMBean(mbean, "type=jdbc");
}
Also used : JdbcServiceImpl(org.apache.karaf.jdbc.internal.JdbcServiceImpl) JdbcMBeanImpl(org.apache.karaf.jdbc.internal.JdbcMBeanImpl) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin)

Aggregations

JdbcMBeanImpl (org.apache.karaf.jdbc.internal.JdbcMBeanImpl)1 JdbcServiceImpl (org.apache.karaf.jdbc.internal.JdbcServiceImpl)1 ConfigurationAdmin (org.osgi.service.cm.ConfigurationAdmin)1