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 (Commented) (JIRA)" <ji...@apache.org> on 2012/02/03 16:33:54 UTC

[jira] [Commented] (FELIX-3337) DependencyManager/Updated configuration dependency does not propagate to provided service properties

    [ https://issues.apache.org/jira/browse/FELIX-3337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199773#comment-13199773 ] 

Pierre De Rop commented on FELIX-3337:
--------------------------------------

I committed a new test which seems to reproduce the issue:

src/test/java/org/apache/felix/dm/test/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java
                
> 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/users@felix.apache.org/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