JAXP default implementation and JDK-8152063
David M. Lloyd
david.lloyd at redhat.com
Thu Mar 24 16:28:30 UTC 2016
On 03/24/2016 11:26 AM, Alan Bateman wrote:
> On 24/03/2016 16:09, David M. Lloyd wrote:
>> If the Layer of the module of the class calling the
>> newInstance/newFactory/etc. method could somehow be consulted in
>> service resolution decisions, that would definitely solve the problem
>> because our container Layers could refer to the default implementation
>> we provide, unless the TCCL overrides it. This would in fact be an
>> ideal solution since we could throw away this horrible proxy layer.
> There is a new ServiceLoader.load method that uses a Layer as context so
> that you can iterate over the service providers in a module layer and
> its parents. It is intended for cases like this. JAXP is not using this
> yet but it could do, we even have an issue tracking an investigation
> into that.
Great! Thanks for the info - needless to say, this would solve many
problems for us.
More information about the core-libs-dev