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

ServiceDependency properties change callback issue

    XMLWordPrintableJSON

Details

    Description

      Xander found out that sometimes, some Dependency "change" callbacks are not invoked.

      For instance, assuming the following scenario with three components A,B,C:

      1. B adapts A and in it’s init adds an instance bound required dependency to C.
      2. Now someone modifies the service properties of A
      3. As a result of that C (which somehow has a required dependency to something requiring A) becomes unavailable
      4. B becomes unregistered because it’s dependency to C is no longer satisfied
      5. Because there’s a check on ds.isRegistered() in the change method in _modifiedService B will never get notified of the new service properties

      in step 5, B is not notified in B.changed(A) because B is in the "waiting for required (instantiated)" state. So, fixing this problem consists in calling ds.isInstantiated() instead of ds.isRegistered() method in ServiceDependencyImpl.doModified().

      Other kind of dependencies might also have the same kind of problem. For example: BundleDependencyImpl.

      Attachments

        Activity

          People

            pderop Pierre De Rop
            pderop Pierre De Rop
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: