Created
February 27, 2020 19:30
-
-
Save forketyfork/4b2d8ae21bc29d49f72bfa44a74127f0 to your computer and use it in GitHub Desktop.
XA with Spring Boot: TransactionConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class TransactionConfig { | |
@Bean("policyPropagationRequired") | |
public SpringTransactionPolicy transactionPolicyPropagationRequired( | |
@Autowired JtaTransactionManager transactionManager) { | |
SpringTransactionPolicy policy = new SpringTransactionPolicy(transactionManager); | |
policy.setPropagationBehaviorName("PROPAGATION_REQUIRED"); | |
return policy; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment