Jigsaw spec clarifications

Alex Buckley alex.buckley at oracle.com
Thu Jan 19 16:30:10 PST 2012


The module name in a 'provides' clause (no 'service') is the identifier 
immediately following 'provides' ... the service name in a 'provides 
service' clause is the identifier immediately following 'service'.

Those are the identifiers which must be unique within a view.

I hope Alan can confirm my understanding of services as follows:

On 1/19/2012 2:33 PM, Jonathan Gibbons wrote:
> provides service S with S_A;
> provides service S with S_B;

Illegal. Ambiguity in which implementation to use.

> provides service S1 with S;
> provides service S2 with S;

Legal.

> 2. The same rule for modules, can you provide different versions of a
> module?
> provides M @ 1.0;
> provides M @ 2.0;
> The spec implies not, which seems surprising for an alias mechanism.

Illegal. If it was legal, do we want to infer that this module does 
_not_ provide M @ 1.5? That seems over-complex to me - providing 2.0, 
which indisputably happens above, usually means matching a requires 
constraint of >= 1.5.

> 3. I presume, but the spec does not say, that in "provides service S
> with S_A" S_A should be a subtype of S.

Ah, I presume this too.

Alex



More information about the jigsaw-dev mailing list