Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14008

Create an alternate javax.xml.rpc.api module for use by the org.jboss.as.ejb3 module

XMLWordPrintable

    • Undefined
    • ---
    • ---

      The JAX-RPC spec has been removed from EE 9 so I don't want to continue to expose it to applications. Ideally we would not ship it at all, but the EE 8 EJB SessionContext interface has a getMessageContext method that returns the JAX-RPC MessageContext method. That's been dropped in EE 9.

      Having separate compilation of our SessionContextImpl class for EE 9 vs 8 would be a big hassle. So our impl just has the method, and for normal use in an EE 9 context it's cruft (not part of the interface). It's never used for normal things and throws an exception if invoked so the fact you'd get a CNFE if you used in an EE9 context it doesn't matter.

      But a problem occurs if reflective code iterates over the methods in the impl class. Then the cruft method gets reflected upon and that fails. I worked around that for session marshaling, but now it looks like the EE 9 TCK is also doing that kind of reflection.

      What I propose to do is to add a new javax.xml.rpc.api.internal module and have org.jboss.as.ejb3 depend on that. The module will be jboss.api=private. In our EE 8 dists, that will depend on and export the normal javax.xml.rpc.api module. In EE 9 we will continue to not provide the javax.xml.rpc.api module, so no other uses of it will be available. In EE 9 javax.xml.rpc.api.internal will itself incorporate the spec API jar as an artifact/resource. But its module.xml will include a filter to limit what it exposes to the single MessageContext class. (The filter is just to make the module even more useless in case someone wants to misuse it.)

      The JAX-RPC API jar is 37K, so continuing to ship it isn't great but isn't terrible.

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: