From f43ad00129f1c0a977c83f7fc39710617f55b854 Mon Sep 17 00:00:00 2001 From: Gytis Trikleris Date: Tue, 11 Jul 2017 15:14:26 +0200 Subject: [PATCH] Delay Narayana recovery manager until it's started explicitly Closes gh-9641 --- .../autoconfigure/transaction/jta/NarayanaJtaConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/NarayanaJtaConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/NarayanaJtaConfiguration.java index 89b7ba3b86..2e645a9fcf 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/NarayanaJtaConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/NarayanaJtaConfiguration.java @@ -22,6 +22,7 @@ import javax.jms.Message; import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; +import com.arjuna.ats.arjuna.recovery.RecoveryManager; import com.arjuna.ats.jbossatx.jta.RecoveryManagerService; import org.jboss.narayana.jta.jms.TransactionHelper; import org.jboss.tm.XAResourceRecoveryRegistry; @@ -115,6 +116,7 @@ public class NarayanaJtaConfiguration { @Bean @DependsOn("narayanaConfiguration") public RecoveryManagerService narayanaRecoveryManagerService() { + RecoveryManager.delayRecoveryManagerThread(); return new RecoveryManagerService(); }