From 1d7700ab5c8dd0bd318e6ac7afa16a12f728a7a0 Mon Sep 17 00:00:00 2001 From: "amalka.subasinghe" Date: Thu, 24 Aug 2023 16:31:17 +0530 Subject: [PATCH] imrpoved heart beat to handle cluster formation changed --- .../service/ClusterFormationChangedNotifierRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/ClusterFormationChangedNotifierRepository.java b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/ClusterFormationChangedNotifierRepository.java index bb0c7726de..9c711366ae 100644 --- a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/ClusterFormationChangedNotifierRepository.java +++ b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/ClusterFormationChangedNotifierRepository.java @@ -15,8 +15,9 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service; +package io.entgra.device.mgt.core.device.mgt.core.push.notification.mgt; +import io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service.ClusterFormationChangedNotifier; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -40,7 +41,7 @@ public class ClusterFormationChangedNotifierRepository { public void addNotifier(String className) { try { if (!StringUtils.isEmpty(className)) { - Class clz = Class.forName(className); + Class clz = ClassLoader.getSystemClassLoader()forName(className); ClusterFormationChangedNotifier notifier = (ClusterFormationChangedNotifier) clz.newInstance(); notifiers.put(notifier.getType(), notifier); }