Yes, it does.

I wanted to see the INSTALLED event to monitor whether the deployment was 
successful or not. Event if it didn't resolve, I would be able to tell that it 
is missing some packages or other capabilities and therefore doesn't get wired. 
However, with only the callback to addingBundle in installed state, I never 
know that the bundle is actually resolved (at some time later) unless someone 
actually starts the bundle and triggers the other events to come.

On a side note, it is very annoying that a bundle that is installed and started 
may be added in ACTIVE state with STARTED BundleEvent, thereby missing all 
interim states and events. However, when you stop and restart the bundle, you 
will see the interim events. This makes the code ugly as you have to repeat the 
processing to account for either scenario.

  Tim.


From: BJ Hargrave <[email protected]<mailto:[email protected]>>
Reply-To: OSGi Developer Mail List 
<[email protected]<mailto:[email protected]>>
Date: Thursday, September 19, 2013 7:50 PM
To: OSGi Developer Mail List 
<[email protected]<mailto:[email protected]>>
Subject: Re: [osgi-dev] BundleTracker question

Does your addingBundle method return a non-null value to cause the bundle to be 
tracked? If you don't do this, then you will never get a modifiedBundle call 
for that bundle (since it is not tracked.)
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance<http://www.osgi.org/>
[email protected]<mailto:[email protected]>

office: +1 386 848 1781
mobile: +1 386 848 3788





From:        Tim Diekmann <[email protected]<mailto:[email protected]>>
To:        OSGi Developer Mail List 
<[email protected]<mailto:[email protected]>>
Date:        2013/09/19 21:32
Subject:        [osgi-dev] BundleTracker question
Sent by:        
[email protected]<mailto:[email protected]>

________________________________



Small question for the experts.

A BundleTracker with the arguments

Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | 
Bundle.STOPPING

Gets a callback to addingBundle for any Bundle in INSTALLED state. That is, an 
bundle.install() call synchronously calls all BundleTrackers with the new 
Bundle.

Why does the BundleTracker not get a callback to the modifiedBundle() method 
when the bundle is subsequently refreshed and reaches RESOLVED state? I see 
BundleEvents for the state change, but no callback.

Tested with Equinox 3.9.0. Any ideas?

  Tim.
_______________________________________________
OSGi Developer Mail List
[email protected]<mailto:[email protected]>
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to