felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-2968) Bind method of optional references can be called before bind methods of mandatory references
Date Mon, 30 May 2011 11:28:47 GMT

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

Felix Meschberger commented on FELIX-2968:
------------------------------------------

The order is specified exactly in Section 112.5.7, Binding Services:

  "When binding services, the references are processed in the order in which
    they are specified in the component description. That is, target services from
    the first specified reference are bound before services from the next speci-
    fied reference."

So, just order the references "correctly" in your descriptor and you should be done.


> Bind method of optional references can be called before bind methods of mandatory references
> --------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2968
>                 URL: https://issues.apache.org/jira/browse/FELIX-2968
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions:  scr-1.6.0
>            Reporter: Guest
>              Labels: felix, scr
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Hi, 
> i got the following problem.
> I've some references to services, some of them are mandatory and some are optional. Well
now osgi/scr waits to call the bind methods till all mandatory services are available. 
> However when it starts to call the bind methods it seems that it doesn't care if those
are mandatory or optional. This can result in a not expected behavior where optional dependencies
are satisfied before the mandatory are. 
> Consider you have a optional dynamic multiple service binding which you want to use with
a mandatory service. There's as far as it looks to me no way to ensure that the mandatory
binds are called before optional are allowed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message