From 5ae0f34333313cd2dc961b5f2cc6ce57553dd420 Mon Sep 17 00:00:00 2001 From: BLasan Date: Tue, 29 Oct 2024 13:54:23 +0530 Subject: [PATCH] fixes: https://github.com/wso2/api-manager/issues/3297 --- .../apimgt/gateway/listeners/GatewayStartupListener.java | 9 ++++++--- .../apimgt/impl/listeners/ServerStartupListener.java | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/listeners/GatewayStartupListener.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/listeners/GatewayStartupListener.java index 0aad7acfdd8c..141663f9bc4b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/listeners/GatewayStartupListener.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/listeners/GatewayStartupListener.java @@ -222,9 +222,12 @@ public void completedServerStartup() { jmsTransportHandlerForEventHub.subscribeForJmsEvents(APIConstants.TopicNames.TOPIC_ASYNC_WEBHOOKS_DATA, new GatewayJMSMessageListener()); copyTenantArtifacts(); - APILoggerManager.getInstance().initializeAPILoggerList(); - LLMProviderManager.getInstance().initializeLLMProviderConfigurations( - MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + Thread thread = new Thread(() -> { + APILoggerManager.getInstance().initializeAPILoggerList(); + LLMProviderManager.getInstance().initializeLLMProviderConfigurations( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + }); + thread.start(); } else { log.info("Running on migration enabled mode: Stopped at Gateway Startup listener completed"); } diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/listeners/ServerStartupListener.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/listeners/ServerStartupListener.java index f8fbeb0a17af..d07b0d6e240b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/listeners/ServerStartupListener.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/listeners/ServerStartupListener.java @@ -74,7 +74,11 @@ public void completedServerStartup() { } else { log.info("Running on migration enabled mode: Stopped at ServerStartupListener completed"); } - CorrelationConfigManager.getInstance().initializeCorrelationComponentList(); + + Thread thread = new Thread(() -> { + CorrelationConfigManager.getInstance().initializeCorrelationComponentList(); + }); + thread.start(); } /**