diff options
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java index cf94bfcb..9fc2c837 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java @@ -457,10 +457,19 @@ public class PolicyContainer implements Startable logger.info("updateToVersion:releaseId " + releaseId.toString()); } - // notify all 'PolicySession' instances + // stop all session threads + for (PolicySession session : sessions.values()) + { + session.stopThread(); + } + + // update the version Results results = kieContainer.updateToVersion(releaseId); + + // restart all session threads, and notify the sessions for (PolicySession session : sessions.values()) { + session.startThread(); session.updated(); } |