ServiceLoader.load* take 2
David M. Lloyd
david.lloyd at redhat.com
Tue Jun 12 14:01:24 PDT 2012
On 06/12/2012 03:46 PM, Jesse Glick wrote:
> On 06/12/2012 04:25 PM, David M. Lloyd wrote:
>> the existing service loader mechanism works well with multiple class
>> loaders as is
>
> *If* the TCCL is set to a special value which can "see into" all modules
> in the configuration, rather than just being the module loader for the
> "main" module.
Well this is just a difference of expectation. My expectation is that
TCCL won't have global visibility. In fact my expectation is that
*nothing* will have global visibility. I don't know what this "seeing
into all modules" business is supposed to mean or how it's supposed to
work. If you're talking about full dependency tree traversal, it's not
clear to me why this is desirable; it does seem to me like undesired
(private) implementations might pop in though.
> That is possible, given a ClassLoader.getResources
> variant mentioned by me earlier. But not necessarily less hackish, and
> probably trickier to optimize than what Paul's webrev has. Anyway I
> think the observed behavior would be identical for most cases.
I just don't understand what problem is being solved here. It seems
like a specific behavior is the goal, but what is the purpose of the
behavior? How does it relate to current real-world libraries and
applications (including third-party stuff)?
--
- DML
More information about the jigsaw-dev
mailing list