The best option is, of course, to avoid using ServiceLoader as far as possible
and to use injection to obtain the services. This way your Java SE injection
container can use ServiceLoader (or whatever else it wants) and you can use
OSGi services when in OSGi…
Tim
On 18 May 2018, at 21:41, Raym
Understood, but you won't win that battle with Java EE APIs because for
better or worse they mandate the use of service loader.
The goal for Service Loader Mediator is still valid in this respect and
seems the only viable course of action.
The specific use case I'm working on are the Apache Geron
Precisely. SPI-Fly (and the OSGi ServiceLoader Mediator spec, that it
implements) are for those cases where you have to use ServiceLoader in OSGi.
I think the best think to do here is to create a JIRA for it so that
someone can pick it up and work on it. As Pierre says, it's not a bug as
the order