1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<bean id="myTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"><ref local="mySessionFactory"/></property>
</bean>
<bean id="xService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref ocal="myTransactionManager"/></property>
<property name="target"><ref local="xTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="find*">PROPAGATION_REQUIRED,readOnly,-CommonsErrorException</prop>
<prop key="create*">PROPAGATION_REQUIRED,-CommonsErrorException</prop>
<prop key="update*">PROPAGATION_REQUIRED,-CommonsErrorException</prop>
<prop key="delete*">PROPAGATION_REQUIRED,-CommonsErrorException</prop>
</props>
</property>
</bean> |
Partager