Yes, there is a framework.start() much later.

Everything was starting, I just wasn't seeing the logging. Ended up I was
copying the wrong artifact.


On Fri, Apr 25, 2014 at 9:42 AM, Richard S. Hall <[email protected]>wrote:

> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to