Package org.cxbox.model.core.config
Class PersistenceJPAConfig
java.lang.Object
org.cxbox.model.core.config.PersistenceJPAConfig
To support force active fields in cxbox add following bean:
@Bean
public PlatformTransactionManager transactionManager(
final ApplicationContext applicationContext,
final CxboxBeanProperties cxboxBeanProperties,
final ITransactionStatus txStatus) {
return new CxboxJpaTransactionManagerForceActiveAware(applicationContext, cxboxBeanProperties, txStatus);
}
Cxbox do not autowire this bean by name, so fill free to set any bean name you need.
This transaction manager use EntityManagerFactory autowired by name = ${cxbox.beans.entity-manager-factory} (default "entityManagerFactory")-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauditorAware(TransactionService txService, EffectiveUserAware<Long> effectiveUserAware)
-
Constructor Details
-
PersistenceJPAConfig
public PersistenceJPAConfig()
-
-
Method Details
-
auditorAware
@Bean @TransactionScope public CurrentUserAware<Long> auditorAware(TransactionService txService, EffectiveUserAware<Long> effectiveUserAware)
-