ARTEMIS-3120 Preserve default LocatorConfig if no configuration provided in RecoveryConfig

This commit is contained in:
Bartosz Spyrko-Smietanko 2021-02-15 16:28:33 +00:00 committed by Clebert Suconic
parent d2f06034cb
commit fd1ccbe135
1 changed files with 3 additions and 1 deletions

View File

@ -306,7 +306,9 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList
} else {
serverLocator = ActiveMQClient.createServerLocator(false, xaRecoveryConfig.getTransportConfig());
}
if (xaRecoveryConfig.getLocatorConfig() != null) {
serverLocator.setLocatorConfig(xaRecoveryConfig.getLocatorConfig());
}
serverLocator.disableFinalizeCheck();
serverLocator.setProtocolManagerFactory(xaRecoveryConfig.getClientProtocolManager());
csf = serverLocator.createSessionFactory();