On 03/11/2016 04:42 AM, Alan Bateman wrote:

On 11/03/2016 10:04, Neil Bartlett wrote:
:

Whatever the motivation, I referred to this package as “broken”
because it has caused a great many problems for OSGi users.
Applications that import the javax.transaction package may encounter
NoClassDefFoundError due to the missing types if they wire to the
platform export. The most commonly employed practical solution is to
add back those types with the application ClassLoader.
Deploying the classes on the class path (application class loader) meant
some types in javax.transaction defined to the boot loader (because of
delegation) and some to the application class loader. A sad state of
affairs that would not have worked if there had been any reliance on
anything package private.

Going forward then it requires deploying the EE version of the
java.transaction module on the upgrade module path.

What about javax.transaction.xa? Ideally we won't just throw that into some unnamed module right?

With it being a part of java.sql though, it's going to be pretty tough to separate out. Can it not at least be its own module which can be upgraded in a consistent way with java.transaction? I guess it's just not clear to me how this is going to work. From my perspective, it would be at the least more organizationally convenient to treat all the SE+EE modules in the same way.

Yes, except the types in the javax.sql.rowset package as that is a
different module.

The definition for both the java.sql and java.sql.rowset modules can be
found here:
http://cr.openjdk.java.net/~mr/jigsaw/ea/module-summary.html#java.sql

or if you have the EA builds then `java
-listmods:java.sql,java.sql.rowset` will describe these modules.

In terms of visibility then both modules are currently defined to the
boot loader and hence their types are visible via any of the built-in
class loaders. We are on a mission to move non-core modules out of the
boot loader so that they don't have all permissions by default. Easier
said that done of course but we have already moved all the modules
shared with EE so that they can be upgraded by app servers.

That would definitely be ideal from a security standpoint, especially if in this context "non-core" means "all except for 'java.base'"... or as close as possible to it.

I hope we can move java.sql.rowset module, I don't know about java.sql
yet. There is a small spec change needed to do the latter because
currently only the boot loader can defined java.* types (one of the
comments in your mail suggests you are aware of this detail).

--
- DML

Reply via email to