JDK-8051407 : Re-examine dependency from JAX-WS to java.rmi.Remote and RemoteException
  • Type: Bug
  • Component: xml
  • Sub-Component: jax-ws
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-07-20
  • Updated: 2016-12-01
  • Resolved: 2016-12-01
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
There are static references from JAX-WS to java.rmi.Remote and java.rmi.RemoteException.

com.sun.xml.internal.ws.model.RuntimeModeler -> java.rmi.RemoteException (java.rmi)

com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp -> java.rmi.Remote (java.rmi)
com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp -> java.rmi.RemoteException (java.rmi)

Below are some references Yarda and Miroslav found. 
1. JSR-224, section 3.7: "Service speci���c exceptions are de���ned as all checked exceptions except java.rmi.RemoteException and its subclasses.

Conformance (java.lang.RuntimeExceptions and java.rmi.RemoteExceptions):

java.lang.RuntimeException and java.rmi.RemoteException and their subclasses MUST NOT be treated as service speci���c exceptions and MUST NOT be mapped to WSDL.���

2. JAX-WS spec

B.6 Changes Since Early Draft 3
��� Removed references to the RMI classes that JAX-RPC 1.1 used to denote remoteness, since their role
is now taken by annotations: java.rmi.Remote and java.rmi.RemoteException.

This issue is to re-examine if the dependency to RMI should be needed when the user code has a dependency on RMI and confirm if JAX-WS doesn't require RMI to present for applications that don't use RMI.
Comments
The change has been integrated to JDK 9 via JDK-8164479.
01-12-2016

With this change, java.xml.ws `requires java.rmi` can be removed.
23-09-2016

fixed in RI, needs uptake from JDK
09-09-2016

static references to java.rmi.Remote/java.rmi.RemoteException are there to easily allow conformance to the specification. It should be possible to replace them in the code by traversing the type/exception parents and comparing their names with appropriate string. While it will remove the static reference to rmi, it is likely that it will come with some performance penalty
17-08-2016