JMH and JDK9

Andrew Dinn adinn at redhat.com
Tue Apr 5 09:25:41 UTC 2016


On 04/04/16 22:15, Christian Thalinger wrote:
> 
>> On Mar 31, 2016, at 9:57 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> Are you going to submit a bug to Eclipse on this?
> . . .
> My lack of understanding of the problem tells me no.  Maybe you should :-)

This is actually one example of a more general problem where both Java
EE components and Java EE applications need to employ classes which
extend the class set of a package currently bundled in a Jigsaw module.

For example, as well as the common annotations classes there is also
package javax.transaction into which package the JDK inserts the 3 TX
Exception (RollbackException etc) classes but omits various other TX
classes such as Synchronization left for EE components to define -- for
more details see this dialogue between Sanne Grinovero and Alan

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-March/007156.html

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-March/007157.html

Alan's advice is for EE containers to use -upgrademodule (or -Xpatch)
to override the classes provided in the JDK with the EE implementation
version.

This is indeed a feasible workaround (EE container implementors should
probably be expected to understand the problem and solution). However,
this neglects the fact that there are also standalone uses of these EE
components e.g. for unit testing or for applications which embed, say,
TX behaviour without employing a full EE container. The test case issue
is the most significant one here (although I am sure that EE component
devs will be unhappy about both) since requiring the general user to
understand and fix this problem is a different order of burden.

I have asked Sanne to post a note about this to
jpms-spec-comments at openjdk.java.net for inclusion in the list of open
jigsaw issues to be considered by the implementors and expert group. I
think it is important to consider whether there are other ways we can
approach this problem. For example, would it be possible to provide an
escape clause in Jigsaw which allows stub modules such as this to be
tagged so that they can be automatically extended or replaced from the
classpath without needing any intervention on the command line? n.b. I
don't want an answer here but I want to be sure the problem is recorded
and addressed in the proper place.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (US), Michael O'Neill (Ireland), Paul
Argiry (US)


More information about the hotspot-dev mailing list