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

Pierre De Rop updated FELIX-4334:
---------------------------------

    Attachment: ModifiedBundleDependencyTest.java

attached testcase for BundleDependency.

> 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
>         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.1#6144)

Reply via email to