framework = new Framework();
framework.setVisitor(this);
framework.setLogVisitor(this);
server.registerMBean(framework, new ObjectName(FrameworkMBean.OBJECTNAME));
bundleState = new BundleState();
bundleState.setVisitor(this);
bundleState.setLogVisitor(this);
bc.addBundleListener(bundleState);
server.registerMBean(bundleState, new ObjectName(BundleStateMBean.OBJECTNAME));