1. Tuscany
  2. TUSCANY-3900

Enhance EquinoxServiceDiscoverer to use bundle trackers


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.0
    • Fix Version/s: Java-SCA-2.0
    • Component/s: None
    • Labels:
    • Patch Info:
      Patch Available


      Each time that the EquinoxServiceDiscoverer is called to find a service, it obtains the list of bundles in the bundle context and filters them to identify the Tuscany bundle providers. This could be improved by using a bundle tracker to maintain a list of matching bundles. There actually is some bundle tracker code in the class but it is unused. I am attaching a patch to utilize the bundle tracker.

      The patch creates two bundle trackers, one for all bundles and one for the Tuscany service providing bundles. I changed getBundles() to get the list of bundles from the appropriate tracker rather than the bundle context.

      There are open questions in the code about what state a bundle should be in to be considered. I tried to maintain compatibility with the existing filtering code (isProviderBundle) which accepts all states except UNINSTALLED. Therefore I changed the bundle tracker constructor to include all bundle states except UNINSTALLED. I removed the check in addingBundle() for a STOPPED event because this was not a criteria used in isProviderBundle().

      1. TUSCANY-3900.patch
        12 kB
        Greg Dritschler


        Greg Dritschler created issue -
        Greg Dritschler made changes -
        Field Original Value New Value
        Attachment TUSCANY-3900.patch [ 12487164 ]
        ant elder made changes -
        Fix Version/s Java-SCA-2.0 [ 12315542 ]
        Simon Laws made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]


          • Assignee:
            Greg Dritschler
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: