Class TransactionManagementConfiguration
java.lang.Object
com.foreach.across.modules.hibernate.jpa.config.TransactionManagementConfiguration
@Configuration
@EnableTransactionManagement(order=2147483637)
public class TransactionManagementConfiguration
extends Object
Configures PlatformTransactionManagers for use with @Transaction annotations.
If the module is configured in mixed mode, with both session factory and jpa support enabled,
one of both transaction managers should be configured as the primary when exposed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.transaction.PlatformTransactionManager
jpaTransactionManager
(jakarta.persistence.EntityManagerFactory entityManagerFactory, AcrossHibernateModuleSettings moduleSettings) org.springframework.transaction.support.TransactionTemplate
jpaTransactionTemplate
(org.springframework.transaction.PlatformTransactionManager jpaTransactionManager)
-
Constructor Details
-
TransactionManagementConfiguration
public TransactionManagementConfiguration()
-
-
Method Details
-
jpaTransactionManager
@Bean(name="jpaTransactionManager") @Exposed public org.springframework.transaction.PlatformTransactionManager jpaTransactionManager(jakarta.persistence.EntityManagerFactory entityManagerFactory, AcrossHibernateModuleSettings moduleSettings) -
jpaTransactionTemplate
@Bean @Exposed public org.springframework.transaction.support.TransactionTemplate jpaTransactionTemplate(org.springframework.transaction.PlatformTransactionManager jpaTransactionManager)
-