Change to nexted for transaction propagation.

This commit is contained in:
Paulo Gustavo Veiga 2022-09-26 08:42:55 -07:00
parent 225a913a3a
commit 0c88b8a474

View File

@ -24,12 +24,14 @@
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop>
<prop key="hibernate.default_batch_fetch_size">200</prop>
<prop key="hibernate.nestedTransactionAllowed">true</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="mindmapSessionFactory"/>
<property name="nestedTransactionAllowed" value="true"/>
</bean>
<!-- Hibernate Template Definition -->
@ -41,7 +43,7 @@
class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
<property name="properties">
<props>
<prop key="*">PROPAGATION_REQUIRED_NEW</prop>
<prop key="*">PROPAGATION_NESTED</prop>
</props>
</property>
</bean>