Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8131334

SAAJ Plugability Layer: using java.util.ServiceLoader

XMLWordPrintable

    • b96
    • Verified

      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.

            mkos Miroslav Kos (Inactive)
            mkos Miroslav Kos (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: