spring事物传播和隔离级别

<bean id="txManager"
  class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  <property name="sessionFactory" ref="sessionFactory" />
 </bean>

 <aop:config>
  <aop:pointcut id="bussinessService"
   expression="execution(public * com.service..*.*(..))" />
  <aop:advisor pointcut-ref="bussinessService"
   advice-ref="txAdvice" />
 </aop:config>

 <tx:advice id="txAdvice" transaction-manager="txManager">
  <tx:attributes>
   <tx:method name="getUser" read-only="true" />
   <tx:method name="*" propagation="REQUIRED"/><!--所有的方法都有传播特性-->
  </tx:attributes>
 </tx:advice>

你可能感兴趣的:(spring)