JCE providers as services
Paul Sandoz
paul.sandoz at oracle.com
Wed Jun 20 04:13:42 PDT 2012
On Jun 19, 2012, at 11:39 PM, David M. Lloyd wrote:
>> 2. The order of the returned providers is important and is based on the
>> java.security configuration file. This one I can probably workaround by
>> changing the internal provider lookup code to reorder the Providers
>> returned by ServiceLoader.iterator().
>
> Since these services are essentially global to a configuration, surely it's easy enough to specify, in that global configuration, what order to prefer services to load from in a general sense (i.e. not limited to Provider impls)?
What do you mean by "in a general sense"? (because "services" is such an overloaded term i am not sure which aspects of services you are referring to).
We will require iteration order of service instances to work with ServiceLoader in both classpath mode and module mode.
E.g.:
// list of FQCN of a service provider class to control service instance iteration order
// for those classes that are present
List<String> l = ...
ServiceLoader.orderWith(l).load(ServiceInterface.class);
Paul.
> If not... why not?
>
More information about the jigsaw-dev
mailing list