diff options
author | Serge Simard <serge@agilitae.com> | 2019-09-11 13:38:15 -0400 |
---|---|---|
committer | Yuriy Malakov <Yuriy.Malakov@att.com> | 2019-10-30 14:03:47 +0000 |
commit | 10c327ac421b3411755bc413f6750f7a7b8ba44e (patch) | |
tree | 20ccc912696f43a6c73d9c07b635655c3e0d22a9 /ms/controllerblueprints | |
parent | b8c996b21f76dce07035c1924b5ce9a643e9b3c0 (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
(cherry picked from commit bacce97c415081df60631d97a89e80eb6b3edbab)
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{ |