Services/configuration/context webrevs

Mandy Chung mandy.chung at oracle.com
Wed Jul 4 20:55:07 PDT 2012


On 7/1/2012 2:34 AM, Paul Sandoz wrote:
> Hi,
>
> I thought it would help to consolidate the service/configuration changes into one email.

Yes, that helps.  Thanks.

> Service provider module resolution
> -----------------------------------------------
>
> http://cr.openjdk.java.net/~psandoz/jigsaw/resolver-services/webrev.2/
>
> - "permits" clauses do not affect service provider module resolution
>
> - service provider module resolution occurs after "application" resolution. Essentially the application has to successfully resolve as if there were no "requires service " clauses present and after that service provider module resolution occurs.
>
> I understand that on and off list there is reasonable agreement to go forward with this latter approach.

Doing the service provider dependency resolution in phases would make it 
a little easier to trace and diagnose.  Each phase may add new modules 
to the graph (service provider module and its dependencies) and looks 
like it requires to re-validate if a module is required optionally but 
failed to be chosen in phase 0. For example,

M
    requires optional X;
    requires service S;

P
    requires X @ 1.0
    provides service S with S1;

X @ 1.0
    permits P

In this case, phase 0 will chose M only.  Phase 1 choses P and X at 1.0 and 
the solution includes M, P, and X at 1.0.  However, X at 1.0doesn't permit M 
but it's linked with M in your current implementation.
Nits w.r.t. the change:
Resolver.javaL221: toString() call is not needed
L446: best to follow current convention to put the first parameter
       next to the signature L445 and line break at the second parameter.
L450: 4-space indent would be good.
L458: typo 'dependencey'
L533: if serviceInterface was resolved in previous phases, it can skip 
and process the next service interface.

many.sh L119 - it'd be good to add a comment that p4 is 1 implementation
and permits is ignored.

I think it would be useful to add a few test cases that service provider 
module pulls in new modules and how this fix changes the solution - e.g. 
a case when a provider module is not included due to a module selected 
in phase 0 doesn't satisfy its dependency.

Mandy




More information about the jigsaw-dev mailing list