Class JdbcTransactionAutoConfiguration
java.lang.Object
org.axonframework.extension.springboot.autoconfig.JdbcTransactionAutoConfiguration
@AutoConfiguration
@ConditionalOnBean({javax.sql.DataSource.class,org.springframework.transaction.PlatformTransactionManager.class})
public class JdbcTransactionAutoConfiguration
extends Object
Autoconfiguration class that registers a bean creation method for the
SpringTransactionManager if a
PlatformTransactionManager and a DataSource is present.- Since:
- 5.0.2
- Author:
- John Hendrikx
-
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
-
JdbcTransactionAutoConfiguration
public JdbcTransactionAutoConfiguration()
-
-
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.
-