JDK-8131334 : SAAJ Plugability Layer: using java.util.ServiceLoader
  • Type: Enhancement
  • Component: xml
  • Sub-Component: jax-ws
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-07-15
  • Updated: 2017-05-17
  • Resolved: 2015-11-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b96Fixed
Related Reports
Cloners :  
Cloners :  
Relates :  
Description
SAAJ defines a Plugability Layer that specifies how it will locate an implementation.
 
There are following factories locating implementation using common algorithm, including also service-loader-like facility, but implemented proprietary way and not using java.util.ServiceLoader:
 
javax.xml.soap.SOAPFactory
javax.xml.soap.MessageFactory
javax.xml.soap.SOAPConnectionFactory
javax.xml.soap.SAAJMetaFactory
 
It is necessary to migrate to java.util.ServiceLoader and allow transition to Jigsaw. There are required changes in implementation but also changes in javadoc, which requires CCC / JSR MR.
 
Currently, the javadoc repeats the same for all newInstance methods - example:
 
javax.xml.soap.SOAPFactory#newInstance():
 
Creates a new SOAPFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load:
* Use the javax.xml.soap.SOAPFactory system property.
* Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
* Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.soap.SOAPFactory in jars available to the runtime.
* Use the SAAJMetaFactory instance to locate the SOAPFactory implementation class.