bundleState.setVisitor(this);
bundleState.setLogVisitor(this);
bc.addBundleListener(bundleState);
server.registerMBean(bundleState, new ObjectName(BundleStateMBean.OBJECTNAME));
serviceState = new ServiceState();
serviceState.setVisitor(this);
serviceState.setLogVisitor(this);
bc.addServiceListener(serviceState);
server.registerMBean(serviceState, new ObjectName(ServiceStateMBean.OBJECTNAME));