Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-425

DependencyManager does not correctly handle service counting

    XMLWordPrintableJSON

Details

    Description

      Whenever a referenced service is added to or removed from the framework, the DependencyManager.serviceAdded or serviceRemoved method is called respectively. These methods maintain a counter of services registered in the system matching the selection criteria (service interface and target filter) :

      • when a service added whose ServiceReference does not match the target filter (if any) is ignored. Otherwise the internal
        counter is incremented regardless of whether the service will actually be bound or not
      • when a service is removed it is ignored, if it is not bound. The internal counter is only decremented if the service is bound.

      The problem is, that upon service removal the counter should be decremented if the service matches the target filter regardless of whether the service bound or not. Otherwise the counter might not be decremented and the dependency may be marked satisfied even though no (or not enough) service(s) are available.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: