Dump services webrev

Paul Sandoz paul.sandoz at oracle.com
Tue May 29 08:59:19 PDT 2012


On May 29, 2012, at 5:04 PM, Alan Bateman wrote:

> On 25/05/2012 22:38, Paul Sandoz wrote:
>> :
>> There is a distinction between a service *factory* and a set of services all of which are relevant [*]. For the latter case a rogue service can mess up access to the subset of those that come after it (and that subset is arbitrary and could change for each execution of the VM).
>> 
>> I think we need some ability for the developer to control what should be done under such circumstances (e.g. some callback that decides to continue or re-throw). This is a good use-case for ModuleServiceProvider.
>> 
> I agree that provider interfaces that are themselves factories are less likely to fail at instantiation time. I also agree there will be cases where you want to take some action, log or emit an warning for example, and attempt to continue. However I'm not convinced that it will be can be reliable in the face of a rogue service though, especially if it goes into a loop or hits a resource error. As it stands we have the SCE and while not pretty, it at least gives the caller some control.

Yes, limited control. If i could distill this down it is really about whether there should be control over the propagation of the SCE.

Paul.

> It's probably not worth adding policy support to ServiceLoader but may be something for a replacement in the future if we decide to go in that direction.
> 
> -Alan.




More information about the jigsaw-dev mailing list