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(); } /**