diff options
author | Serge Simard <serge@agilitae.com> | 2019-09-11 13:38:15 -0400 |
---|---|---|
committer | Serge Simard <serge@agilitae.com> | 2019-09-11 13:40:21 -0400 |
commit | bacce97c415081df60631d97a89e80eb6b3edbab (patch) | |
tree | b5637fc5b777de31f1877c65bae8ddc5aec825ac /ms/controllerblueprints | |
parent | 4539cacfa8e45848c34419c2d96edf4375a30d86 (diff) |
Ensure proper unloading of resources associated with the dynamic classloader for Kotlin scripts.
Issue-ID: CCSDK-1692
Signed-off-by: Serge Simard <serge@agilitae.com>
Change-Id: Ic1c1bf263331bf4a43d855798d2d62ec97503ceb
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt index fa6b0ab97..f90e27f4d 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt @@ -39,6 +39,10 @@ object BluePrintCompileCache { fun cleanClassLoader(key: String) { if(hasClassLoader(key)){ + // Make sure to close all classloader loaded resources before we let go of it. + // This fixes a Delete failure message on filesystem that keeps locks on opened jars; + // like Windows and NFS. + classLoaderCache.get(key).close() classLoaderCache.invalidate(key) log.info("Cleaned compiled cache($key)") }else{ |