RFR: JDK-8155786: Determine modules depending on upgradeable modules directly and indirectly

Alan Bateman Alan.Bateman at oracle.com
Tue May 24 10:11:48 UTC 2016


On 24/05/2016 06:26, Ivan Krylov wrote:
>
> I was looking not for the specific list of modules, but rather the 
> definition of the concept.
> As for the list in that Modules.gmk - those 6 modules are the ones 
> that since build 118 are not visible from unnamed modules.
> That is not a coincidence but I do not follow the logic either. 
> Perhaps it was discussed here earlier - sorry about my ignorance then.
Think of upgradeable modules as the replacement for the Endorsed 
Standard Override Mechanism [1]. That mechanism was rarely used but it 
was the supported way for EE/app servers to deploy upgraded version of 
the endorsed APIs or standard technologies.

The old mechanism was essentially -Xbootclasspath/p to override classes 
defined to the boot loader and so doesn't make sense with JDK 9. One 
reason is that most of these APIs, the APIs shared with Java EE in 
particular, have been moved from the boot loader and are not defined to 
the platform (formerly extension) class loader. The other reason is that 
the unit of replacement is at the level of module rather class files and 
so it much more reliable. If you want the Java EE version of the Java 
Transaction API for example, then you deploy it as a module to override 
(as opposed to augment) the module in the JDK.

As regards the list of modules that are upgradeable then I assume this 
will be agreed in JSR 379 (the JSR for Java SE 9). As things currently 
stand in the implementation then the java.corba + EE modules can be 
upgraded. The other standard and JDK modules cannot be upgraded. There 
is a simple mechanism, bashed on the hash of the packaged module, to 
prevent accidental upgrading of modules that are not meant to be 
upgradeable. This is interesting at link time, for example, to prevent 
accidental linking of standard/JDK modules from different JDK builds. 
The hashes are checked in other phases too.

Hope this helps,

-Alan

[1] 
http://docs.oracle.com/javase/8/docs/technotes/guides/standards/index.html


More information about the jigsaw-dev mailing list