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 2016/08/10 22:38:20 UTC

[jira] [Commented] (FELIX-5305) Direct injection of services fails when service properties are updated

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

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

Thanks for reporting. Indeed there was a bug when the service properties were updated (the corresponding map field was cleared instead of being updated).

I committed a testcase based on your sample code in rv 1755887 (FELIX5305_DirectInjectionShouldSeeServiceUpdates.java)
and fixed the bug in rv 1755889 (in FieldUtil.java).

Can you please give a try to the fix and resolve this issue if it's working fine in your environment ? thanks !

> Direct injection of services fails when service properties are updated
> ----------------------------------------------------------------------
>
>                 Key: FELIX-5305
>                 URL: https://issues.apache.org/jira/browse/FELIX-5305
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>    Affects Versions: dependencymanager-4.3.0
>            Reporter: J.W. Janssen
>            Assignee: Pierre De Rop
>         Attachments: FELIX-5305.tgz
>
>
> Consider the following scenario: I've got a service, say, {{ServiceA}}, that is instantiated through configuration by means of a FactoryConfigurationAdapterService. The configuration-update callback manages the service properties of the actual service (it is not propagated).
> Another service, {{ServiceB}}, has a dependency on all instances of ServiceA. I use the direct field injection feature of DM to give me a map of all instances.
> If I update the service properties of any of the {{ServiceA}} instances, I lose them from my instance-map. The configuration is updated, but the instance never is injected back into my map (or my map is not injected back).
> When rewriting {{ServiceB}} to use plain callbacks, all changes are properly tracked.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)