On 21/06/2012 19:02, Joe Wang wrote:
:
For the class loader, as discussed with Paul, since the ServiceLoader
does so much, we may be able to skip the 'using different classloader'
part, that is, simply calling load without classloader. The javadoc
states that it's equivalent to load with context class loader. But
from what I can, it found all that's placed in the endorsed dir or
bootclasspath. I need to do a few more tests on this.
It doesn't seem to be specified but the implementation (in at least some
places) appears to use the TCCL or the defining loader of the
FactoryFinder class (the bootstrap class loader in the case of the JDK).
Using the single-argument ServiceLoader.load is probably want you want now.
:
Maybe I'm a little confused. But the fallback to default
implementation is in the spec. It happens the jaxp ri is installed as
an endorsed technology here and loaded by the ServiceLoader.
Yes, but ultimately we have to get to the point where we can scale down
the platform so you may have an embedded device, for example, that
doesn't validating parsers or a XPathFactory installed for example. So I
think this wording will need to get adjusted in time to allow for the
appropriate *ConfigurationException to be thrown then there isn't any
service provider module installed.
-Alan