[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Re: BundleContext#getServiceReference does not return highest ranked service

Will Horn wrote:
The Javadocs say:

* If multiple such services exist, the service with the highest ranking (as
* specified in its {@link Constants#SERVICE_RANKING} property) is returned.


This does not seem to work when a registered service has it's ranking changed. For example:

- register service1 with rank 15
- register service2 with rank 10
- context.getServiceReference returns ref for service1
- change properties on service2's registration to have rank 20
- context.getServiceReference still returns ref for service1

Is this a bug or a feature of OSGi?

Thanks,
Will

Hi Will

This sounds like a bug. Can you please open a bug against Equinox->Framework at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Equinox

Thanks
Tom.