> From: Tim Diekmann <[email protected]>

> Yes, it does.

Then I am not sure what the problem is. You may need to set a breakpoint 
on the BundleTracker.Tracked.bundleChanged method to see what is 
happening.

I added a new test [1] to the BundleTracker test suite using your state 
criteria mask and the test gets the proper calls at the customizer 
modifiedBundle method when the test bundle's state is changed.

> 
> 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.

The point of the BundleTracker is to track bundles which match the 
specified state criteria. It is not about replaying events that happened 
in the past. If you want that, then the BundleTracker is not what you want 
and you will need to write your own code.

[1] 
https://www.osgi.org/members/gitweb/build.git/commit/8b7fae59a30be7460f786d2cfff5d8809a95ad3d
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to