Hi Radu,

I think the current order is giving the service with the highest ordering
the final call. If two providers provide a value for the same key, the one
with the highest wins as it is called last. So I think this matches the
other usages of service ranking.

Regards
Carsten


2014-08-22 17:17 GMT+02:00 Radu Cotescu <[email protected]>:

> Hi,
>
> In SLING-3320 [0] we introduced some ordering in the BVPs maps, such that
> BVPs are called using the natural ordering of their ServiceReferences,
> which is based on the service.ranking value: the higher the service.ranking
> is, the later in the call chain will a BVP be called to add its bindings.
>
> Given that in the OSGi world the service.ranking is used to determine which
> implementation is returned for a certain service, the rule of thumb being
> that the higher the service.ranking is the most likely that implementation
> will be provided, should't we actually reverse the sort order of the BVPs?
>
> In theory this might introduce some subtle bugs in clients' code, but no
> one complained when we introduced the ordering in the first place.
>
> WDYT?
>
> Cheers,
> Radu
>
> [0] - https://issues.apache.org/jira/browse/SLING-3320
>



-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to