use of org.apache.karaf.jndi.internal.JndiServiceImpl in project karaf by apache.
the class Activator method doStart.
@Override
protected void doStart() throws Exception {
ProxyManager proxyManager = getTrackedService(ProxyManager.class);
register(InitialContextFactory.class, new KarafInitialContextFactory());
JndiServiceImpl service = new JndiServiceImpl();
service.setBundleContext(bundleContext);
service.setProxyManager(proxyManager);
Hashtable<String, String> props = new Hashtable<>();
// bind the JNDI service itself in the JNDI context
props.put("osgi.jndi.service.name", "jndi");
register(JndiService.class, service, props);
JndiMBeanImpl mbean = new JndiMBeanImpl();
mbean.setJndiService(service);
registerMBean(mbean, "type=jndi");
}
Aggregations