From 4d4547ee4b3a6be75cf2c01f3065b129fddcfd3b Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 28 Jun 2021 15:04:36 -0400 Subject: 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 --- .../org/onap/policy/drools/system/PolicyEngineConstants.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'policy-management') diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineConstants.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineConstants.java index 4d18d6b8..2173687a 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineConstants.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineConstants.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-management * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,9 @@ package org.onap.policy.drools.system; import lombok.Getter; +import org.onap.policy.common.utils.network.NetworkUtil; -public class PolicyEngineConstants { +public final class PolicyEngineConstants { /** * Default Telemetry Server Port. @@ -39,6 +40,11 @@ public class PolicyEngineConstants { */ public static final String TELEMETRY_SERVER_DEFAULT_NAME = "TELEMETRY"; + /** + * Unique name of this drools-pdp JVM. + */ + public static final String PDP_NAME = NetworkUtil.genUniqueName("drools"); + /** * Policy Engine Manager. */ -- cgit 1.2.3-korg