2014/8/13 7:20 -0700, alan.bate...@oracle.com:
> The usual thing is to just have a default implementation that is used 
> when ServiceLoader doesn't locate a useful provider. You'll find many 
> examples of this in the JDK. In those cases then the default is not 
> listed in a services configuration file. From what you describe then 
> this may be what you want too.
> 
> ServiceLoader does not have a way to configure a preferred provider so 
> this is one reason why you'll see places where a system property can be 
> used to configured the preferred implementation.

Another alternative is to use the ServiceLoader::loadInstalled method,
which will ignore providers on the application class path.

- Mark

Reply via email to