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/11/28 18:47:43 UTC

[jira] Created: (FELIX-425) DependencyManager does not correctly handle service counting

DependencyManager does not correctly handle service counting
------------------------------------------------------------

                 Key: FELIX-425
                 URL: https://issues.apache.org/jira/browse/FELIX-425
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger


Whenever a referenced service is added to or removed from the framework, the DependencyManager.serviceAdded or serviceRemoved method is called respectively. These methods maintain a counter of services registered in the system matching the selection criteria (service interface and target filter) :

   - when a service added whose ServiceReference does not match the target filter (if any) is ignored. Otherwise the internal
       counter is incremented regardless of whether the service will actually be bound or not
   - when a service is removed it is ignored, if it is not bound. The internal counter is only decremented if the service is bound.

The problem is, that upon service removal the counter should be decremented if the service matches the target filter regardless of whether the service bound or not. Otherwise the counter might not be decremented and the dependency may be marked satisfied even though no (or not enough) service(s) are available.

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


[jira] Work started: (FELIX-425) DependencyManager does not correctly handle service counting

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-425 started by Felix Meschberger.

> DependencyManager does not correctly handle service counting
> ------------------------------------------------------------
>
>                 Key: FELIX-425
>                 URL: https://issues.apache.org/jira/browse/FELIX-425
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> Whenever a referenced service is added to or removed from the framework, the DependencyManager.serviceAdded or serviceRemoved method is called respectively. These methods maintain a counter of services registered in the system matching the selection criteria (service interface and target filter) :
>    - when a service added whose ServiceReference does not match the target filter (if any) is ignored. Otherwise the internal
>        counter is incremented regardless of whether the service will actually be bound or not
>    - when a service is removed it is ignored, if it is not bound. The internal counter is only decremented if the service is bound.
> The problem is, that upon service removal the counter should be decremented if the service matches the target filter regardless of whether the service bound or not. Otherwise the counter might not be decremented and the dependency may be marked satisfied even though no (or not enough) service(s) are available.

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


[jira] Closed: (FELIX-425) DependencyManager does not correctly handle service counting

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-425.
-----------------------------------

    Resolution: Fixed

Fixed in Rev. 599073 by decrementing the service counter after checking whether the removed service matches the target
filter but before checking whether the service is actually bound or not.

Deployed new Snapshot build 0.9.0-20071128.175152-9

> DependencyManager does not correctly handle service counting
> ------------------------------------------------------------
>
>                 Key: FELIX-425
>                 URL: https://issues.apache.org/jira/browse/FELIX-425
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> Whenever a referenced service is added to or removed from the framework, the DependencyManager.serviceAdded or serviceRemoved method is called respectively. These methods maintain a counter of services registered in the system matching the selection criteria (service interface and target filter) :
>    - when a service added whose ServiceReference does not match the target filter (if any) is ignored. Otherwise the internal
>        counter is incremented regardless of whether the service will actually be bound or not
>    - when a service is removed it is ignored, if it is not bound. The internal counter is only decremented if the service is bound.
> The problem is, that upon service removal the counter should be decremented if the service matches the target filter regardless of whether the service bound or not. Otherwise the counter might not be decremented and the dependency may be marked satisfied even though no (or not enough) service(s) are available.

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


[jira] Updated: (FELIX-425) DependencyManager does not correctly handle service counting

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-425:
------------------------------------

    Fix Version/s: scr-1.0.0

> DependencyManager does not correctly handle service counting
> ------------------------------------------------------------
>
>                 Key: FELIX-425
>                 URL: https://issues.apache.org/jira/browse/FELIX-425
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.0.0
>
>
> Whenever a referenced service is added to or removed from the framework, the DependencyManager.serviceAdded or serviceRemoved method is called respectively. These methods maintain a counter of services registered in the system matching the selection criteria (service interface and target filter) :
>    - when a service added whose ServiceReference does not match the target filter (if any) is ignored. Otherwise the internal
>        counter is incremented regardless of whether the service will actually be bound or not
>    - when a service is removed it is ignored, if it is not bound. The internal counter is only decremented if the service is bound.
> The problem is, that upon service removal the counter should be decremented if the service matches the target filter regardless of whether the service bound or not. Otherwise the counter might not be decremented and the dependency may be marked satisfied even though no (or not enough) service(s) are available.

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