From b3f8c28fa4c50d0acd19ef98638feb0e9bd7457f Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Thu, 22 Feb 2018 12:12:30 +0530 Subject: Improve realiabilty by using sleep instead of wait Issue-ID: VFC-764 Change-Id: I6b91a1c3d5655eb0bdae9549f4d630094c55df8e Signed-off-by: Kanagaraj Manickam k00365106 --- .../service/adapter/impl/ResmgrAdapterMgrService.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ResmanagementService/service/src') diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java index 625b41d..12e4061 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java @@ -106,9 +106,6 @@ public class ResmgrAdapterMgrService implements IResmgrAdapterMgrService { private static class RegisterResmgrThread implements Runnable { - // Thread lock Object - private final Object lockObject = new Object(); - private IResmgrAdapter2MSBManager adapter2MSBMgr = new ResmgrAdapter2MSBManager(); // url and mothedtype @@ -151,9 +148,7 @@ public class ResmgrAdapterMgrService implements IResmgrAdapterMgrService { // if registration fails,wait one minute and try again try { - synchronized(lockObject) { - lockObject.wait(Constant.REPEAT_REG_TIME); - } + Thread.sleep(Constant.REPEAT_REG_TIME); } catch(InterruptedException e) { LOG.error(e.getMessage(), e); // Restore interrupted state... -- cgit 1.2.3-korg