Community
Participate
Working Groups
A BundleTracker is used by the file-based discovery bundle org.eclispe.ecf.osgi.services.discovery.local to track bundles that publish a service description using the Remote-Service header. This BundleTracker incorrectly tracks both RESOLVED and ACTIVE bundles. It does not make sense to track RESOLVED bundles, since then a bundle's contributions cannot be disabled by deactivating it. The Remote Services Admin specification states that only ACTIVE and STARTING (in the case of lazy activation) bundles should be used. See method init() of FileBasedDiscoveryImpl.java.
Fix released to HEAD. Fix was to replace previously used state mask (36 == RESOLVED | ACTIVE), with: bt = new BundleTracker(context, Bundle.ACTIVE | Bundle.STARTING, new BundleTrackerImpl(this)); Thanks Neil for the report. Resolving as fixed.
This fix breaks all three unit tests. https://build.ecf-project.org/hudson/job/C-HEAD-discovery.local.feature/12/testReport/
(In reply to comment #2) > This fix breaks all three unit tests. > https://build.ecf-project.org/hudson/job/C-HEAD-discovery.local.feature/12/testReport/ The problem appears to be, that now the BundleTracker sends multiple events for the same bundle contributions in the STARTING as well as the ACTIVE state.
Removing lazystart from both "...poststarted" test bundles fixes the unit tests. This is a correct fix as those tests are supposed to test cases where bundles are activated explicitly. They are not meant to test lazy activation. ATM we simply don't test lazy activation.
Created attachment 179969 [details] mylyn/context/zip