<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<!-- prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop -->
<prop key="*">PROPAGATION_REQUIRED</prop>
<prop key="save">PROPAGATION_REQUIRED</prop>
<prop key="update">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<bean id="autoProxyCreator"
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<idref local="transactionInterceptor" />
</list>
</property>
<property name="beanNames">
<list>
<value>studentDAO</value>
<value>classeDAO</value>
<!--<idref local="classeDAO" /> NE MARCHE PAS NON PLUS -->
</list>
</property>
</bean>
Partager