You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre De Rop (JIRA)" <ji...@apache.org> on 2014/07/22 00:44:38 UTC

[jira] [Closed] (FELIX-4334) ServiceDependency properties change callback issue

     [ https://issues.apache.org/jira/browse/FELIX-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre De Rop closed FELIX-4334.
--------------------------------


> ServiceDependency properties change callback issue
> --------------------------------------------------
>
>                 Key: FELIX-4334
>                 URL: https://issues.apache.org/jira/browse/FELIX-4334
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>    Affects Versions: dependencymanager-3.1.0
>            Reporter: Pierre De Rop
>            Assignee: Pierre De Rop
>             Fix For: dependencymanager-3.2.0
>
>         Attachments: AdapterWithModifiedInstanceBoundDependencyTest.java, ModifiedBundleDependencyTest.java
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)