I assume you have a framework.start() in there that you are not showing us?
-> richard On 4/25/14, 10:42 , Keith Hughes wrote:
Hi folks, I have a strange bug and suspect it may be due to bundle startup order in Felix.So I am trying to log bundle startup order. I tried adding a bundle listener to the Framework object before starting it and see nothing being logged at all. My code looks like this: framework = getFrameworkFactory().newFramework(m); frameworkStartLevel = framework.adapt(FrameworkStartLevel.class); framework.init(); rootBundleContext = framework.getBundleContext(); rootBundleContext.addBundleListener(new BundleListener() { @Override public void bundleChanged(BundleEvent event) { try { System.out.println(event.getType()); if (event.getType() == BundleEvent.STARTED) { Bundle bundle = event.getBundle(); System.out.println( String.format("Bundle %s:%s started", bundle.getSymbolicName(), bundle.getVersion())); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); I then later add bundles and start them and yet never see a peep. Any ideas? Thanks, -Keith
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org