From 776036d6b432e5b5a203e5670fd224b8ec2f7ce0 Mon Sep 17 00:00:00 2001 From: lbwexler Date: Tue, 28 Jan 2025 14:23:44 -0500 Subject: [PATCH] Add some comments --- grails-app/init/io/xh/hoist/ClusterConfig.groovy | 6 +++++- .../services/io/xh/hoist/cluster/ClusterService.groovy | 2 +- src/main/groovy/io/xh/hoist/HoistCoreGrailsPlugin.groovy | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/grails-app/init/io/xh/hoist/ClusterConfig.groovy b/grails-app/init/io/xh/hoist/ClusterConfig.groovy index 61c4cf90..9e50162e 100755 --- a/grails-app/init/io/xh/hoist/ClusterConfig.groovy +++ b/grails-app/init/io/xh/hoist/ClusterConfig.groovy @@ -132,8 +132,12 @@ class ClusterConfig { * Hoist Core's `ClientErrorService` for an example. */ protected void createDefaultConfigs(Config config) { - config.setProperty('hazelcast.shutdownhook.enabled', 'false') + config.setProperty('hazelcast.logging.type', 'slf4j') + + // Hoist core will orchestrate hz shutdown from its own hook: See HoistCoreGrailsPlugin + config.setProperty('hazelcast.shutdownhook.enabled', 'false') + config.getMapConfig('default').with { statisticsEnabled = true inMemoryFormat = InMemoryFormat.OBJECT diff --git a/grails-app/services/io/xh/hoist/cluster/ClusterService.groovy b/grails-app/services/io/xh/hoist/cluster/ClusterService.groovy index e2a5e712..79c08c00 100644 --- a/grails-app/services/io/xh/hoist/cluster/ClusterService.groovy +++ b/grails-app/services/io/xh/hoist/cluster/ClusterService.groovy @@ -152,7 +152,7 @@ class ClusterService extends BaseService implements ApplicationListener event) {} void onShutdown(Map event) { + // Orchestrate shutdown here. This is *after* all plugin and app Bootstrap.destroy() have run Timer.shutdownAll() ClusterService.shutdownHazelcast() }