Patch-module with dynamic layer creating.
Alan Bateman
Alan.Bateman at oracle.com
Sat Oct 13 07:43:23 UTC 2018
On 12/10/2018 21:57, Alex Sviridov wrote:
> Hi Alan,
>
> Thank you for detailed explanation. It is great that we have API that allows to implement
> such features. However, what I suggest is a little different. I am speaking about using
> existing code for such features.
>
> I think this way - firstly, we can do write the same code many times. We can, but we
> don't want. Secondly if we pass parameters to JPMS via JVM options to configure boot
> layer, it would be great if we had possibility to pass the same parameters to configure a
> custom layer without writing a line of code and use existing JDK code.
>
> Of course this is my person opinion. It is interesting to hear what other developers think.
>
I'm skeptical on both the feasibility and desirability of going there.
If a container is creating module layers at runtime then it is arranging
which modules are observable, e.g. it may choose one version of JAX-RS
for one configuration/layer, and another version for another
configuration/layer. In your scenario it may want to patch or augment
one of these modules. I don't think you can easily express this on the
command line as there isn't anything to identify the layer than you want
to adjust. Also module names may not be sufficient in the face of a
container wanting to make available different versions. It's also
possible that a container would want to opt out from this as it would
want full control of which modules to resolve.
-Alan
More information about the jigsaw-dev
mailing list