Project: springxd
Issue XD-3159: Better handle the lifecycle of module classloaders
The various methods is ModuleUtils sometimes create module classloaders just for the sake of loading a single file. URLClassLoader are now closeable, which we should try to do, but not too early. Some of the signatures in that class are problematic (esp the ones that return a Resource) because we don't know when the client will be done with that resource. So we can't close the underlying CL for them. Investigate other approaches: * callback style signatures (ie doWithClassLoader(cl) for certain cases) * global CL caching mechanism per module type:name (but then issues arise when module bytecode is changed, etc)
Story points: 5