Module system and services directory in META-INF

Jochen Theodorou blackdrag at gmx.org
Wed Dec 27 13:13:23 UTC 2017


On 27.12.2017 13:22, Cédric Champeau wrote:
[...]
> 1. is the spec saying somewhere that no-one should ever use
> `META-INF/services` for something else than a service for `ServiceLoader`?
> If not, then ModuleFinder should probably be patched to recognize that
> sometimes it's not the case.

or the javadoc of ServiceLoader should be cleared up as well as the jar 
file spec should contain at least a pointer to the javadoc for "further" 
specification.

> 2. the 2d aspect of the question is what Jochen described as "would the
> service loader infrastructure let us unload services".

I assume, that since the ServiceLoader is looking up services lazy 
(which btw speaks against a requirement in 1), then a reload (which 
really is more a reset) could in theory free resources, since the 
services would first have to be rediscovered. Not sure if that is good 
enough for us.

And before I start ranting how the extensive usage of CallerSensitive 
makes a runtime practically require "all the rights" to run properly and 
thus degrading the java module system or the runtime impossible I better 
stop :(

bye Jochen


More information about the jigsaw-dev mailing list