[POLICY-21] PDP-D gets stuck during shutdown 27/5027/4
authorRalph Straubs <rs8887@att.com>
Wed, 14 Jun 2017 08:56:05 +0000 (03:56 -0500)
committerRalph Straubs <rs8887@att.com>
Wed, 14 Jun 2017 13:02:46 +0000 (08:02 -0500)
commit3cc1a85a832771cb70ed9cbaab9031bc4a114308
tree72c6b95e049790fbfeb5ad96066fa4fbbd112d38
parent85e12563d2092018f83b456f5926f2b28f9742c7
[POLICY-21] PDP-D gets stuck during shutdown

The fix for this problem is included in the following enhancements:

1) Define a new nested interface 'PolicySession.ThreadModel', which makes
   it possible for features to control the thread or threads processing
   a 'KieSession'.

   The nested class 'PolicySession.DefaultThreadModel' implements the
   default version, which uses 'KieSession.fireUntilHalt()' instead of
   polling 'KieSession.fireAllRules()'.

   A new method 'selectThreadModel(PolicySession session)' has been added
   to 'PolicySessionFeatureAPI' to enable this selection.

2) Update thread names when 'KieContainer.updateToVersion(...)' is called

Change-Id: Ic48089fe5660501e2e3d42b87501697211a9d0fe
Signed-off-by: Ralph Straubs <rs8887@att.com>
policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySessionFeatureAPI.java