@Override
public Object addingService(ServiceReference reference) {
Object service = context.getService(reference);
if (service instanceof MicroKernel) {
MicroKernel kernel = (MicroKernel) service;
KernelNodeStore store = new KernelNodeStore(kernel);
services.put(reference, context.registerService(
NodeStore.class.getName(),
store,
new Properties()));
registrations.add(registerMBean(whiteboard, CacheStatsMBean.class,
store.getCacheStats(), CacheStatsMBean.TYPE, store.getCacheStats().getName()));
}
return service;
}