Hi Brad,

It depends a little bit on what technology you use to consume the service.
I guess you're using Blueprint since this mail is sent to Aries and as
Christian mentions there may be some work needed there.

If you use Declarative Services you can get a re-binding behaviour by using
Dynamic (and/or Greedy) service references, which basically will have the
effect that your client is automatically rebound if a new service with a
higher ranking becomes available. You can see an example of such a client
here:
https://github.com/coderthoughts/primes/blob/master/client/src/main/java/org/coderthoughts/primes/client/PrimeClient.java
and
http://coderthoughts.blogspot.com/2016/02/branch-by-abstraction-and-osgi.html

Cheers,

David

On 1 April 2016 at 06:58, Christian Schneider <[email protected]>
wrote:

> The current behaviour is required by the spec. We plan to add an option to
> configure this https://issues.apache.org/jira/browse/ARIES-1314.
> Unfortunately I did not yet have the time to implement this.
>
> Christian
>
> 2016-03-31 19:39 GMT+02:00 Brad Johnson <[email protected]>:
>
>> I've set up separate bundles exposing the same service interface with
>> different ranking.  The test stubs are low ranking and the production code
>> is higher ranking.
>>
>> The problem is I'm seeing a first come, first served behavior and not
>> selection of service based on ranking. If I stop/uninstall a bundle then
>> the other service is immediately picked up as one would expect.  But if I
>> restart a bundle, even if it has the highest service ranking, then the
>> lower ranking service is bound while the bundle with the higher ranking
>> service restarts.  What I'd expected/hoped is that the manager would
>> automatically switch the proxy over to the higher ranking service if no
>> other filters are specified.  Is there a setting or flag I'm missing that
>> would trigger that behavior?
>>
>> Brad
>>
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>
>
> Open Source Architect
> http://www.talend.com
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
>

Reply via email to