From fd1ccbe13553fab16b12f8a687a58c703e55b50e Mon Sep 17 00:00:00 2001 From: Bartosz Spyrko-Smietanko Date: Mon, 15 Feb 2021 16:28:33 +0000 Subject: [PATCH] ARTEMIS-3120 Preserve default LocatorConfig if no configuration provided in RecoveryConfig --- .../extensions/xa/recovery/ActiveMQXAResourceWrapper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java index e11b388ef4..146a722d16 100644 --- a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java +++ b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java @@ -306,7 +306,9 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } else { serverLocator = ActiveMQClient.createServerLocator(false, xaRecoveryConfig.getTransportConfig()); } - serverLocator.setLocatorConfig(xaRecoveryConfig.getLocatorConfig()); + if (xaRecoveryConfig.getLocatorConfig() != null) { + serverLocator.setLocatorConfig(xaRecoveryConfig.getLocatorConfig()); + } serverLocator.disableFinalizeCheck(); serverLocator.setProtocolManagerFactory(xaRecoveryConfig.getClientProtocolManager()); csf = serverLocator.createSessionFactory();