Resolution exception when service interface gets exposed via --add-exports
Remi Forax
forax at univ-mlv.fr
Tue Nov 21 09:29:51 UTC 2017
Hi Alan,
I use jlink plugins for 2 things,
- code generation, i.e. find patterns in the bytecode and optimize them because at link time you are in a closed world, so something that was dynamic is not anymore.
- just bytecode crawling to find specific annotations to improve startup.
I believe implementation like Weld or Spring should have access to an open API to be able to do thing kind of optimizations, imagine, you could create all proxies upfront or better use invokedynamic to even avoid proxy creation at all.
The plugin API doesn't have to be complex, it's a read/replace/append of bytecode files.
Rémi
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "Gunnar Morling" <gunnar at hibernate.org>
> Cc: "jigsaw-dev" <jigsaw-dev at openjdk.java.net>
> Envoyé: Mardi 21 Novembre 2017 09:33:33
> Objet: Re: Resolution exception when service interface gets exposed via --add-exports
> On 20/11/2017 21:56, Gunnar Morling wrote:
>> I see, thanks for the clarification.
>>
>> It's a pity, though, I hoped to employ that approach for providing a
>> custom jlink plug-in (implementation of
>> jdk.tools.jlink.plugin.Plugin). So it seems that's not possible until
>> jdk.jlink exports j.t.j.plugin? Are there any plans to do so some time
>> soon?
>>
>> Even if it was marked as experimental/incubating, being able to
>> provide custom jlink plug-ins would enable interesting use cases.
>>
> There was interest in creating an incubating module in JDK 9 but it was
> put aside due to the issues of tool modules depending on an incubating
> module. The other issue is that most of the interesting plugins to date
> do code generation at link time and are deeply tied to specific areas of
> java.base and other core modules (they can't really live outside of the
> jdk repo). So while it might be desirable to expose the interface for
> plugins, I think it will need further exploration to see if it makes
> sense or not.
>
> -Alan
More information about the jigsaw-dev
mailing list