Review Request: loading JCE providers using ServiceLoader

Sean Mullan sean.mullan at oracle.com
Wed Aug 1 11:10:01 PDT 2012


On 07/31/2012 12:26 AM, Paul Sandoz wrote:
> Hi Sean,
>
> The patch looks OK to me.
>
> You have a redundant synchronised block in
> Provider#doLoadProviderUsingServiceLoader you might want to remove.

The lock is on the ServiceLoader and I think that's still necessary. 
There's a ProviderConfig created for each Provider. It's possible there 
may be more than one thread accessing the ServiceLoader which is 
currently shared by all Providers.

> You might wanna put some comments in as to why you are caching the
> ServiceLoader instance. IIRC you are trying to reduce the amount of
> code changes to ProviderList while ensuring service instance
> selection is efficient, is that so?

Ok.

I'm working on another webrev for review soon.

--Sean

>
> Paul.
>
> On Jul 20, 2012, at 9:58 AM, Sean Mullan <sean.mullan at oracle.com>
> wrote:
>
>> Please review my code changes to enable JCE providers to be
>> registered and loaded as services using the ServiceLoader API:
>>
>> http://cr.openjdk.java.net/~mullan/jigsaw/webrevs/jce-service/webrev.00/
>>
>>
>>
There is one outstanding issue that needs to be resolved, but I think we 
can try
>> to resolve this later:
>>
>> You cannot load more than one PKCS11 provider (ex: with different
>> configurations), as currently supported and documented in the
>> PKCS11 guide [1].
>>
>> Thanks, Sean
>>
>> [1]
>> http://docs.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html
>



More information about the jigsaw-dev mailing list