From e94ee4540f0faee30ddd62bf7725cfc1eaad9077 Mon Sep 17 00:00:00 2001 From: Andrew Pielage Date: Wed, 12 Jun 2024 11:49:12 +0100 Subject: [PATCH] FISH-8334 Add Named annotation to inject correct Hazelcast instance config when in a deployment group Without this it will inject the first deployment group instance config found, which isn't necessarily the correct one Signed-off-by: Andrew Pielage --- .../java/fish/payara/nucleus/hazelcast/HazelcastCore.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nucleus/payara-modules/hazelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/HazelcastCore.java b/nucleus/payara-modules/hazelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/HazelcastCore.java index e168693a66e..93a4f9b4808 100644 --- a/nucleus/payara-modules/hazelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/HazelcastCore.java +++ b/nucleus/payara-modules/hazelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/HazelcastCore.java @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) [2016-2023] Payara Foundation and/or its affiliates. All rights reserved. + * Copyright (c) 2016-2024 Payara Foundation and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -76,6 +76,7 @@ import fish.payara.nucleus.events.HazelcastEvents; import jakarta.annotation.PostConstruct; import jakarta.inject.Inject; +import jakarta.inject.Named; import org.glassfish.api.StartupRunLevel; import org.glassfish.api.admin.ServerEnvironment; import org.glassfish.api.admin.ServerEnvironment.Status; @@ -169,6 +170,7 @@ public class HazelcastCore implements EventListener, ConfigListener { HazelcastRuntimeConfiguration configuration; @Inject + @Named(ServerEnvironment.DEFAULT_INSTANCE_NAME) HazelcastConfigSpecificConfiguration nodeConfig; @Inject