diff options
author | Jim Hahn <jrh3@att.com> | 2021-06-28 15:04:36 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-06-29 10:21:49 -0400 |
commit | 4d4547ee4b3a6be75cf2c01f3065b129fddcfd3b (patch) | |
tree | c98e2237ab5565ba4af267814fb484fbae14dd64 /feature-lifecycle/src/main | |
parent | d2b5424c17ef26d5e71b3014234cfd02f7854eca (diff) |
Use unique name in drools PdpMessages
Also modified distributed locking to use the unique name, in case the DB
is shared.
Issue-ID: POLICY-3410
Change-Id: I046a9ffdcb62f3d84d7d388a1e64bcf025fbbf75
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-lifecycle/src/main')
-rw-r--r-- | feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java index 0e602ec5..3cec7451 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java @@ -53,7 +53,6 @@ import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher; import org.onap.policy.common.endpoints.listeners.ScoListener; import org.onap.policy.common.gson.annotation.GsonJsonIgnore; import org.onap.policy.common.utils.coder.StandardCoderObject; -import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.drools.metrics.Metric; import org.onap.policy.drools.persistence.SystemPersistenceConstants; import org.onap.policy.drools.policies.DomainMaker; @@ -112,7 +111,7 @@ public class LifecycleFsm implements Startable { protected TopicSinkClient client; @Getter - protected final String name = NetworkUtil.getHostname(); + protected final String name = PolicyEngineConstants.PDP_NAME; protected LifecycleState state = new LifecycleStateTerminated(this); @@ -179,7 +178,7 @@ public class LifecycleFsm implements Startable { logger.info("The mandatory Policy Types are {}. Compliance is {}", mandatoryPolicyTypes, isMandatoryPolicyTypesCompliant()); - stats.setPdpInstanceId(Metric.HOSTNAME); + stats.setPdpInstanceId(PolicyEngineConstants.PDP_NAME); } @GsonJsonIgnore |