Upgradeable Modules Question
Alan Bateman
Alan.Bateman at oracle.com
Wed Sep 7 08:32:54 UTC 2016
On 07/09/2016 08:49, Richard Opalka wrote:
>
> Your guess was correct Alan (my english isn't perfect).
> Yes my distorted question was whether it should be possible to
> "upgrade" Jigsaw module with automatic module.
Yes, you do can do this.
>
> Few more questions:
>
> * Module java.se.ee defines list of upgradeable modules (related to EE).
> Is it enforced by JDK (at both compile time and runtime)
> only upgradeable modules can be upgraded?
It's not enforced at compile-time, there is an open issue (JDK-8133882)
to ponder that point.
It is enforced (by way of hashes) at link-time and run-time.
> There are no other upgradeable modules except
> those listed in java.se.ee, right?
For the Java SE modules then that is correct. The list is of course
something that the JSR for Java SE 9 will need to decide on. These APIs
have always been upgradeable via the endorsed standards override
mechanism (most have been leading a double life as standalone
technologies too).
There may be some other modules that are upgradeable. In the Oracle
builds then the java.jnlp module is upgradable, as are the modules with
Java Web Start and the Java Plugin.
> Or one could upgrade any module not provided by Boot loader?
None of the upgradeable modules are defined to the boot loader.
>
> * Both AppClassLoader and PlatformClassLoader don't override
> ClassLoader.getResource(String) method which fallbacks to NOOP
> ClassLoader::findResource(String). Shouldn't they implement it?
They implement/override findResource/findResources.
>
> I'm asking because I upgraded JAXB module locally with automatic module.
> There's
>
> META-INF/services/javax.xml.bind.JAXBContext
>
> provided there but resourceLookup doesn't work.
Can you provide a bit more detail as to what you are using an the
automatic module? Ideally it would be something like:
--upgrade-module-path eemods --add-modules java.xml.bind
but I'm guessing you might have artifacts like jaxb-api-<version>.jar,
in which case the derived module name isn't useful.
One thing to mention is there are changes to JAXB to work with modules.
Those changes are in the JDK and I believe are also in the upstream
Metro project where the RI is maintained. The MR of JSR 222 hasn't been
done yet so there isn't a released standalone version with the updated
support. I only bring it up in case you might be running into issues
here. AFAIK, the more significant update is the additional of new
service type, javax.xml.bind.JAXBContextFactory and updates to the spec
to work with ServiceLoader. At a guess then you might be using an old
version that doesn't have any of this.
One other thing is to ask is whether you see any difference with the
Jigsaw EA builds. I ask because those builds don't have resource
encapsulation, pending resolution of this issue in the JSR.
-Alan
More information about the jigsaw-dev
mailing list