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 2009/07/28 09:21:14 UTC

[jira] Created: (FELIX-1413) Newly registered services must not immediately bound for static references

Newly registered services must not immediately bound for static references
--------------------------------------------------------------------------

                 Key: FELIX-1413
                 URL: https://issues.apache.org/jira/browse/FELIX-1413
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR), Specification compliance
    Affects Versions: scr-1.0.8
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: scr-1.2.0


Consider a static component references with mulitplie cardinality, that is 0..n or 1..n.

If the component is satisified and active, all services existing at the time of activation are bound. If now a service is registered matching the component's reference this newly registered service must not be bound to the component.

Only if the component is reactivated for another reason (e.g. reconfiguration or removal of a statically bound service) may the newly registered service be bound. This is comparable to optional package imports: such imports are only wired to newly installed bundles when the importing bundle is explicitly rewired.

In other words here is what may happen :

   (1) Component C is enabled, satisfied and activated. All services bound. C has static, multiple reference to Service type TS
   (2) Service S of type TS is registered
   (3) The service is *not* bound
   (4) Component C is deactivated (e.g. for reconfiguration)
   (5) Component C is still satisifed and activated. Now Service S is bound
   
In current versions (1.0.8 and earlier) scr is immediately reactivating the component to bind the new Service S in step 3; which is wrong.

See also the discussion on the OSGi dev list "Questions on DS Spec" [1] for full details.

[1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg00883.html

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


[jira] Closed: (FELIX-1413) Newly registered services must not immediately bound for static references

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

Felix Meschberger closed FELIX-1413.
------------------------------------


SCR 1.2.0 has been released. Close all issues.

> Newly registered services must not immediately bound for static references
> --------------------------------------------------------------------------
>
>                 Key: FELIX-1413
>                 URL: https://issues.apache.org/jira/browse/FELIX-1413
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR), Specification compliance
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>
> Consider a static component references with mulitplie cardinality, that is 0..n or 1..n.
> If the component is satisified and active, all services existing at the time of activation are bound. If now a service is registered matching the component's reference this newly registered service must not be bound to the component.
> Only if the component is reactivated for another reason (e.g. reconfiguration or removal of a statically bound service) may the newly registered service be bound. This is comparable to optional package imports: such imports are only wired to newly installed bundles when the importing bundle is explicitly rewired.
> In other words here is what may happen :
>    (1) Component C is enabled, satisfied and activated. All services bound. C has static, multiple reference to Service type TS
>    (2) Service S of type TS is registered
>    (3) The service is *not* bound
>    (4) Component C is deactivated (e.g. for reconfiguration)
>    (5) Component C is still satisifed and activated. Now Service S is bound
>    
> In current versions (1.0.8 and earlier) scr is immediately reactivating the component to bind the new Service S in step 3; which is wrong.
> See also the discussion on the OSGi dev list "Questions on DS Spec" [1] for full details.
> [1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg00883.html

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


[jira] Resolved: (FELIX-1413) Newly registered services must not immediately bound for static references

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

Felix Meschberger resolved FELIX-1413.
--------------------------------------

    Resolution: Fixed

Fixed in Rev. 799647

* If a service is registered for a static reference, the service is ignored.

* If a service registration is modified the bound service is unbound and then bound again. For static references this causes a component reactivation. For dynamic component this may cause a deactivation because the reference is not satisified anymore. In both cases the event handling can terminate because there is nothing more to do for a deactivated component.

> Newly registered services must not immediately bound for static references
> --------------------------------------------------------------------------
>
>                 Key: FELIX-1413
>                 URL: https://issues.apache.org/jira/browse/FELIX-1413
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR), Specification compliance
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>
> Consider a static component references with mulitplie cardinality, that is 0..n or 1..n.
> If the component is satisified and active, all services existing at the time of activation are bound. If now a service is registered matching the component's reference this newly registered service must not be bound to the component.
> Only if the component is reactivated for another reason (e.g. reconfiguration or removal of a statically bound service) may the newly registered service be bound. This is comparable to optional package imports: such imports are only wired to newly installed bundles when the importing bundle is explicitly rewired.
> In other words here is what may happen :
>    (1) Component C is enabled, satisfied and activated. All services bound. C has static, multiple reference to Service type TS
>    (2) Service S of type TS is registered
>    (3) The service is *not* bound
>    (4) Component C is deactivated (e.g. for reconfiguration)
>    (5) Component C is still satisifed and activated. Now Service S is bound
>    
> In current versions (1.0.8 and earlier) scr is immediately reactivating the component to bind the new Service S in step 3; which is wrong.
> See also the discussion on the OSGi dev list "Questions on DS Spec" [1] for full details.
> [1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg00883.html

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