From df49bfe5eacceac0f8e9343c51746135dabbff20 Mon Sep 17 00:00:00 2001 From: Purushottam Khedre Date: Mon, 17 Feb 2025 20:21:16 +0530 Subject: [PATCH] Moved the elastic facade init before postFacadeInit call --- .../context/ExecutionContextFactoryImpl.groovy | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/framework/src/main/groovy/org/moqui/impl/context/ExecutionContextFactoryImpl.groovy b/framework/src/main/groovy/org/moqui/impl/context/ExecutionContextFactoryImpl.groovy index c1804561d..0e803750b 100644 --- a/framework/src/main/groovy/org/moqui/impl/context/ExecutionContextFactoryImpl.groovy +++ b/framework/src/main/groovy/org/moqui/impl/context/ExecutionContextFactoryImpl.groovy @@ -234,12 +234,15 @@ class ExecutionContextFactoryImpl implements ExecutionContextFactory { screenFacade = new ScreenFacadeImpl(this) logger.info("Screen Facade initialized") - postFacadeInit() - - // NOTE: ElasticFacade init after postFacadeInit() so finds embedded from moqui-elasticsearch if present, can move up once moqui-elasticsearch deprecated + /** + * NOTE: Moved ElasticFacade init before postFacadeInit() as the moqui-elasticsearch component is not being used. + * Before this change, the ElasticFacade was initialized after the postFacadeInit() method. + */ elasticFacade = new ElasticFacadeImpl(this) logger.info("Elastic Facade initialized") + postFacadeInit() + logger.info("Execution Context Factory initialized in ${(System.currentTimeMillis() - initStartTime)/1000} seconds") } @@ -294,12 +297,15 @@ class ExecutionContextFactoryImpl implements ExecutionContextFactory { screenFacade = new ScreenFacadeImpl(this) logger.info("Screen Facade initialized") - postFacadeInit() - - // NOTE: ElasticFacade init after postFacadeInit() so finds embedded from moqui-elasticsearch if present, can move up once moqui-elasticsearch deprecated + /** + * NOTE: Moved ElasticFacade init before postFacadeInit() as the moqui-elasticsearch component is not being used. + * Before this change, the ElasticFacade was initialized after the postFacadeInit() method. + */ elasticFacade = new ElasticFacadeImpl(this) logger.info("Elastic Facade initialized") + postFacadeInit() + logger.info("Execution Context Factory initialized in ${(System.currentTimeMillis() - initStartTime)/1000} seconds") }