CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

Daniel Fuchs daniel.fuchs at oracle.com
Tue Dec 4 15:55:03 UTC 2012


On 12/4/12 3:42 PM, Daniel Fuchs wrote:
>> In the class descriptions it suggests that the default implementation
>> may be "installed as a module" but we aren't there yet so I'm not sure
>> about using the term "module". I think it should be okay to say
>> "installed as an extension" as ServiceLoader uses this term.

So that would be the wording:

      * Uses the service-provider loading facilities, defined by the
      * {@link java.util.ServiceLoader} class, to attempt to locate
      * and load an implementation of the service. If there are
      * providers other than the implementation specific default
      * located, then the first provider that is
      * not the default is instantiated and returned; Otherwise
      * the default implementation is returned if it is on the
      * classpath or installed as an extension.

This however suggests that in JDK 8 the default implementation
*needs* to be put on the classpath or installed as an extension.
But is that right?
Wouldn't that be required only when running with a profile in
which the default implementation is not present by default?

Maybe we need to find yet a better wording.

-- daniel



More information about the core-libs-dev mailing list