As suggested by Brian, I'd like to draw attention to the discussion on
The PR is an upgrade of the webservices stack, including JBossWS, Apache
CXF, JAXB-RI and JAXB API. In particular, the JAXB upgrade is for EE8 and
better JDK 9 compatibility.
Now, due to the upgrade of the JAXB API spec jar, the PR is essentially
stalled since 20 days; the new spec is released as an alpha (as it's been
tested within JBossWS only) and that does not satisfy a rule that requires
any artifact being pulled to be Final.
We're talking about a spec jar, we could simply re-tag that as Final,
chances are we won't need changes any time soon there anyway, but as Tomaz
pointed out, in principle that would be dishonest.
While I see the point in requiring that only sufficiently stable upgrades
are applied to the codebase, I'm wondering whether, maybe, we're going a
bit too far with the rules. Brian wrote on this topic: "how to determine
that something is good enough to go in without using master as a test bed" ?
during development of WF11 we have done lots of work on making it build &
run on JDK9.
as release nears I would like to summarize what the current state is and
how to move on.
Currently most of our core  & full  testsuite passes on latest builds
Remaining failures are already addressed by  and 
**But** passing testsuite on JDK9 is not the same as using our binary
distribution under JDK9.
Currently as part of running build / testsuite we override version of
javassit to 3.22.0-CR2
which is currently the only version that works properly on JDK9.
As there is no .GA version of javassit that work on JDK9 avalible we
currently do not have it as default.
On top of that, hibernate as main user of javassit is not tested enough
with this version of javassist
unless hibernate / JPA team says otherwise.
That would in practice mean that users running WF11 on JDK9 would have
issues with JPA/Hibernate
Currently I see two options how to address this:
- upgrade javassist to 3.22.x in server, preferably ask for .GA release.
- produce additional WildFly.x.x.x-jdk9 zip that would include the newer
So question is do we even want to have working JDK9 build of WildFly 11
or should we postpone this for next update release.
JBoss Modules has a redirection mechanism for JAXP that allows us to
override the default provider with one from a module, while still
allowing TCCL-based selection to occur. Since Java 9, our
implementation violates the stricter reflection rules that are now in
place, meaning that JBoss Modules will probably stop working in a
future version. We had hoped that Java 9 would have some useful way
to establish the default implementation of various JAXP factories, but
that never happened. So I want to take the opportunity to review a
few mitigation options and get some feedback.
Option 1: Fix the redirection facility in Java 9
Java 9 offers a "newDefaultFactory()" method on most (maybe all) of
the JAXP factory classes, which always simply instantiates the system
provider of the given function. Using this method should allow us to
bypass the now-disallowed reflection by switching all of the cached
Constructor<? extends T> fields with cached Supplier<T> fields, whose
implementation would either be a call to the appropriate
newDefaultFactory() or a service loader-style public Constructor call.
• Less change
• We can still override the default JAXP implementation
• Continue carrying around the baggage of the __redirected code
until/unless the JAXP spec is modified to allow setting the default
Option 2: Stop using redirection in Java 9, "cold turkey"
We could delete these classes completely. Instead of setting the
default JAXP implementation, we ensure that any modules using JAXP
have a services dependency on the implementation(s) corresponding to
those APIs, carefully monitoring TCCL setup and usage or ensuring that
the newFactory(xxx, getClass().getClassLoader()) form is always used,
depending on the situation.
• No more dealing with redirection ever again
• While deployments generally use the newFactory() form, but
deployments also have TCCL set so that's not a problem
• One less source of bugs
• It may be hard to be sure that we've done this 100% correctly in all
cases outside of deployments; the results could be weird mixed
Option 3: Use a dependency strategy
We could cause JBoss Modules to always include a "hidden" last
dependency on our chosen default JAXP implementation, which in turn
could be set up by a service loader configuration in the boot module.
• Simpler than redirection
• Due to the way JAXP works, we have to pollute the target module's
namespace with the implementation classes (though with redirection
we've already done that via __redirected classes)
So far Option 1 is (unfortunately) still looking the best to me,
overall. Does anyone have any differing opinions on this?
Sorry, I dropped the list on my last post; see below...
On Tue, Dec 5, 2017 at 7:42 AM, Brian Stansberry <
> On Mon, Dec 4, 2017 at 8:33 PM, Stuart Douglas <stuart.w.douglas(a)gmail.com
> > wrote:
>> On Tue, Dec 5, 2017 at 3:40 AM, Brian Stansberry <
>> brian.stansberry(a)redhat.com> wrote:
>>> Great. :)
>>> One thing I think we need to do is figure out how to get custom TCK runs
>>> for PR branches. The TCK is a big part of our test coverage, and one way to
>>> not "use master as a test bed" is to get a check of a branch on the TCK
>>> before we merge it.
>>> I know we've gotten TCK runs of ad-hoc branches before, so by "figure
>>> out" I mean work out how to make that not overly painful, come to some sort
>>> of consensus on when it's worthwhile, etc.
>> I think if we were going to do this it should probably be something
>> reviewers can ask for on specific PR. The TCK uses a *lot* more resources
>> than a standard CI run, so we need to make sure we limit it to cases where
>> it is required.
> Yes, for sure we wouldn't want to do this broadly; submitters or reviewers
> should ask.
> I had in mind a fairly limited set of scenarios. Things like major/minor
> version bumps of the big EE components, or some large scale change with
> fairly clear TCK implications where we'd be reluctant to undo the change if
> it caused a problem. *Perhaps* core upgrades, as those somewhat amount to
> the latter. And then late in the cycle some last minute fixes where we
> sometimes ask for a custom run anyway.
> Doing custom runs doesn't buy much for small changes where if they fail
> TCK after merge we just revert them or we can spend a few days sorting the
> problem without stressing out.
>>> On Fri, Dec 1, 2017 at 10:04 AM, Alessio Soldano <asoldano(a)redhat.com>
>>>> There you go... PR updated to consume the same api jar now released as
>>>> On Fri, Dec 1, 2017 at 3:30 PM, David Lloyd <david.lloyd(a)redhat.com>
>>>>> On Thu, Nov 30, 2017 at 5:50 PM, Alessio Soldano <asoldano(a)redhat.com>
>>>>> > As suggested by Brian, I'd like to draw attention to the discussion
>>>>> > https://github.com/wildfly/wildfly/pull/10604 .
>>>>> > The PR is an upgrade of the webservices stack, including JBossWS,
>>>>> > CXF, JAXB-RI and JAXB API. In particular, the JAXB upgrade is for
>>>>> EE8 and
>>>>> > better JDK 9 compatibility.
>>>>> > Now, due to the upgrade of the JAXB API spec jar, the PR is
>>>>> > stalled since 20 days; the new spec is released as an alpha (as it's
>>>>> > tested within JBossWS only) and that does not satisfy a rule that
>>>>> > any artifact being pulled to be Final.
>>>>> > We're talking about a spec jar, we could simply re-tag that as Final,
>>>>> > chances are we won't need changes any time soon there anyway, but as
>>>>> > pointed out, in principle that would be dishonest.
>>>>> My opinion is that you should go ahead and make a .Final tag. In the
>>>>> (unlikely?) event that the spec has to be modified for some reason, I
>>>>> think you could make a 1.0.1.Final tag and call it a "bug fix".
>>>>> The alternative is to simply wait. I don't think there is any middle
>>>>> > While I see the point in requiring that only sufficiently stable
>>>>> > are applied to the codebase, I'm wondering whether, maybe, we're
>>>>> going a bit
>>>>> > too far with the rules. Brian wrote on this topic: "how to determine
>>>>> > something is good enough to go in without using master as a test
>>>>> bed" ?
>>>>> I don't think we are; I agree with the policy as it stands. If you
>>>>> look at it in terms of being able to release at any time, then it
>>>>> follows that everything _must_ be stable.
>>>>> - DML
>>>> wildfly-dev mailing list
>>> Brian Stansberry
>>> Manager, Senior Principal Software Engineer
>>> Red Hat
>>> wildfly-dev mailing list
> Brian Stansberry
> Manager, Senior Principal Software Engineer
> Red Hat
Manager, Senior Principal Software Engineer
Hi everyone, I want to outline a brief plan for the next couple steps
towards a better alignment between JBoss Modules and Java 9.
In Java 9, the platform classes are divided up into modules; the core set being:
java.base java.compiler java.datatransfer
java.desktop java.instrument java.jnlp
java.logging java.management java.management.rmi
java.naming java.prefs java.rmi
java.scripting java.security.jgss java.security.sasl
java.smartcardio java.sql java.sql.rowset
In addition, the java.se module re-exports many of these.
As a first step towards alignment, it seems to me that we need to
introduce the ability for modules to create module dependencies on
these module names. However, unless we want to require Java 9 from
now on, the names must also work on Java 8.
So, I plan to follow this approximate plan:
• Introduce a new PlatformModuleLoader in to JBoss Modules JDK-specific code
◦ On Java 9+, this loader will create modules from the
corresponding JPMS platform module set
◦ On Java 8, this loader will create "system" modules from the
path sets which comprise the contents of these modules, possibly
including some "jdk.*" modules which are equivalent between Java 8 and
• Update the LocalModuleLoader to pre-delegate module searches to
• Remove "java" from the "system packages list"
• Bring these changes in to WildFly Core
• Deprecate the "javax.api", "sun.jdk", etc. modules, and also APIs
which use a different-than-standard name like "javax.sql.api", replace
their system dependency content with regular re-export dependencies on
• Deprecate and replace other modules whose names are standardized but
different than ours, such as "java.corba", "java.transaction",
"java.xml.bind", etc., with delegations to modules with the standard
• Remove the "system" dependency type from the "urn:jboss:module:1.7" schema
One of the remaining unknowns is that there is only one Java 9
platform family in the wild right now, and it's OpenJDK-based. Other
vendors might introduce a different set of "jdk.*" modules, for
example, which might mean that the Java 8 emulation code for that
platform family may have to be updated. I consider this risk to be
It may also be necessary to have a compatibility mode or flag to
automatically add "java.se" as a module dependency, or perhaps to
re-add the "java" package prefix to the system package set, depending
on how compatibility shapes up in the end.
I hope to achieve this work in JBoss Modules 1.7; this would probably
be the last significant change before I start moving towards .Final.
So, if you have any feedback on this idea, please let me know here