You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/09/15 21:24:32 UTC

[jira] Commented: (FELIX-364) 0..1 dynamic service reference does not bind properly.

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

Felix Meschberger commented on FELIX-364:
-----------------------------------------

Thanks for reporting this issue. It turns out, that support for non-multiple (cardinality 0..1 or 1..1) dynamically bound services is not implemented properly at all. 

The DependencyManager class internally keeps all services being tracked. In the case of multiple service bindings, this is no issue as the bind and unbind methods must just be called. For non-multiple references, only one service must be bound and this is also the only service, which may be unbound.

The solution to this problem is, that the DependencyManager has to keep track of which service has actually been bound in the case of non-multiple bindings to decide whether to bind a new service and whether to unbind a service being unregistered.

> 0..1 dynamic service reference does not bind properly.
> ------------------------------------------------------
>
>                 Key: FELIX-364
>                 URL: https://issues.apache.org/jira/browse/FELIX-364
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services
>    Affects Versions: 0.8.0
>         Environment: Java 1.6
>            Reporter: I-Ann Chen
>            Assignee: Felix Meschberger
>         Attachments: patch.txt
>
>
> There are 2 parts to the issue. Both are with a component with a reference to a service where cardinality=0..1 and policy=dynamic.
> 1. If the bundle providing the service is stopped (without another bundle providing the same service) and restarted, the service is not re-bound to the component.
> 2. If the service is started after the component referencing it, then the service is never bound to the component.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.