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 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 a SpringTransactionManager based on the given transactionManager.
      Parameters:
      transactionManager - The PlatformTransactionManager used to construct a SpringTransactionManager.
      entityManagerProvider - An optional entity manager provider.
      connectionProvider - An optional connection provider.
      Returns:
      The TransactionManager to be used by Axon Framework.