DependencyManager/Updated configuration dependency does not propagate to 
provided service properties
----------------------------------------------------------------------------------------------------

                 Key: FELIX-3337
                 URL: https://issues.apache.org/jira/browse/FELIX-3337
             Project: Felix
          Issue Type: Bug
          Components: Dependency Manager
    Affects Versions: dependencymanager-3.0.0
            Reporter: Pierre De Rop
            Priority: Minor


This issue is related to the following post:

    http://www.mail-archive.com/[email protected]/msg11711.html

The problem is the following; it seems that when a service S1 depends on a 
ConfigurationDependency with propagate = true, then the configuration is 
propagated to the service properties provided by S1, but when the configuration 
is changed (by ConfigAdmin), then the S1 service properties are not updated.

For example, here is the service S1 which depends on a Configuratin pid "test":

         Component s1 = m.createComponent()
                .setImplementation(new S1()))
                .setInterface(S1.class.getName(), null)
                .add(m.createConfigurationDependency()
                     .setPid("test")
                     .setPropagate(true));

We assume that the configuration pid "test" contains "testkey=testvalue"

Now, we have S2, which depends on S1 like this:

        Component s2 = m.createComponent()
                .setImplementation(new S2())
                .add(m.createServiceDependency()
                     .setService(S1.class, ("(testkey=testvalue)"))
                     .setRequired(true)
                     .setCallbacks("add", "change", null));

So, at initialization, S2 is properly injected with S1 (in its "add" method).
But when the configuration is updated, S2 is not called back in its "change" 
method (I think that it should be, because the ConfigurationDependency
declared in S1 is using propagate=true flag.

I will manage to commit a testcase which reproduce this issue.

/pierre



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to