Hi,
Richard S. Hall schrieb:
> To be clear, any additions with static policy should be ignored, not
> just 1..1. For example, static 0..n would not see newly arriving
> services after the component was activated, no matter if it was started
> with 0 or n services at the time of activation. The only changes that
> cannot be ignored, obviously, are the removal of used services.
Hmm. Interesting. Now, this has confusing consequences.
Consider the following case.
(1) Two Services serviceA registered (call it s1 and s2)
(2) Component C with statically bound serviceA reference with
0..n is activated:
-> Services s1 and s2 are bound
(3) serviceA type service s3 is registered but *not* bound to
Component C
(4) serviceA type service s1 is unregistered
-> Component C has to be deactivated to unbind s1
Is step (4) correct ? I assume, yes.
But, what now ?
(a) C remains deactivated
(b) C is activated again with just s2 bound
(c) s2 remains bound, s3 is newly bound and C is activated
Which of these options is the intended behaviour ?
BTW: Felix DS currently deactivates C to bind s3 upon registration and
then reactivates C again. Likewise Felix DS implements option (c).
Regards
Felix
>
> -> richard
>
>>
>>>> Q4: as Q3, but dynamic reference
>>>>
>>
>> How about this one ? Has the CPEG decided to state something for dynamic
>> bindings, too ?
>>
>> I terms of consistency, I would assume, that regardless of whether a
>> service is bound statically or dynamically, it should not never be
>> replaced (unless the bound service is unregistered or the target
>> property is modified such that service binding changes).
>>
>> WDYT ?
>>
>> Regards and Thanks
>> Felix
>>
>>
>>
>>>> Again, we replace the bound serviceA with the new serviceA on the same
>>>> assumption (consistency). And of course consistency is also the reason
>>>> to handle static and dynamic references the same.
>>>>
>>>> We actually had a bug report for this problem when we did not replace
>>>> lower ranking services with higher ranking ones: FELIX-950 [1].
>>>>
>>>>
>>>> I think, that if service ranking is only respected for the inital
>>>> service binding, it is close to useless because you never know in which
>>>> order components are activated and services registered. Just my €0.02 of
>>>> course and there may be other (better) reasons.
>>>>
>>>>
>>>> Regards
>>>> Felix
>>>>
>>>> [1] https://issues.apache.org/jira/browse/FELIX-950
>>>>
>>>>
>>>>
>>>>> =======
>>>>> Ikuo YAMASAKI
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> OSGi Developer Mail List
>>>>> [email protected]
>>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> OSGi Developer Mail List
>>>> [email protected]
>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>>
>>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> OSGi Developer Mail List
>>> [email protected]
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>
>>
>>
>> _______________________________________________
>> OSGi Developer Mail List
>> [email protected]
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev