use of de.invesdwin.context.persistence.jpa.scanning.transaction.LoggingDelegateTransactionManager in project invesdwin-context-persistence by subes.
the class PersistenceUnitContext method createTransactionManager.
private PlatformTransactionManager createTransactionManager() {
final JpaTransactionManager jpaTransactionManager = new JpaTransactionManager();
jpaTransactionManager.setEntityManagerFactory(getEntityManagerFactory());
final JpaDialect jpaDialect = getJpaDialect();
if (jpaDialect != null) {
jpaTransactionManager.setJpaDialect(jpaDialect);
}
final LoggingDelegateTransactionManager loggingDelegateTransactionManager = new LoggingDelegateTransactionManager(this, jpaTransactionManager);
final String transactionManagerBeanName = getPersistenceUnitName() + PersistenceProperties.TRANSACTION_MANAGER_NAME_SUFFIX;
MergedContext.getInstance().registerBean(transactionManagerBeanName, loggingDelegateTransactionManager);
Assertions.assertThat(MergedContext.getInstance().getBean(transactionManagerBeanName)).isNotNull();
return loggingDelegateTransactionManager;
}
Aggregations