aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules
diff options
context:
space:
mode:
authorBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>2019-09-12 17:05:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-12 17:05:59 +0000
commit2419999ae7ab0bc8b555a955d5dfbc9eef9d6f3e (patch)
tree2fcdde6ffd5cd69bb149627ffac7ac3d40b6682e /ms/controllerblueprints/modules
parent6b8fbc694e204117efe3ae44c99ae08d64c11f9a (diff)
parentbacce97c415081df60631d97a89e80eb6b3edbab (diff)
Merge "Ensure proper unloading of resources associated with the dynamic classloader for Kotlin scripts."
Diffstat (limited to 'ms/controllerblueprints/modules')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt4
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{