Class JpaTransactionAutoConfiguration
java.lang.Object
org.axonframework.extension.springboot.autoconfig.JpaTransactionAutoConfiguration
@AutoConfiguration
@ConditionalOnBean({jakarta.persistence.EntityManagerFactory.class,org.springframework.transaction.PlatformTransactionManager.class})
public class JpaTransactionAutoConfiguration
extends Object
Autoconfiguration class that registers a bean creation method for the
SpringTransactionManager if a
PlatformTransactionManager and a EntityManagerFactory is present.- Since:
- 3.0.3
- Author:
- Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaxonTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager, EntityManagerProvider entityManagerProvider, ConnectionProvider connectionProvider) Bean creation method constructing aSpringTransactionManagerbased on the giventransactionManager.
-
Constructor Details
-
JpaTransactionAutoConfiguration
public JpaTransactionAutoConfiguration()
-
-
Method Details
-
axonTransactionManager
@Bean @ConditionalOnMissingBean public TransactionManager axonTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager, @Nullable EntityManagerProvider entityManagerProvider, @Nullable ConnectionProvider connectionProvider) Bean creation method constructing aSpringTransactionManagerbased on the giventransactionManager.- Parameters:
transactionManager- ThePlatformTransactionManagerused to construct aSpringTransactionManager.entityManagerProvider- An optional entity manager provider.connectionProvider- An optional connection provider.- Returns:
- The
TransactionManagerto be used by Axon Framework.
-