您的位置:首页 > 编程语言 > Java开发

Spring事务控制(txManager)

2010-04-02 10:58 204 查看
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>

<aop:config>
<aop:advisor pointcut="execution(* com.fone.platform.service..*.*(..))" advice-ref="txAdvice"/>
</aop:config>

<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="l*" propagation="REQUIRED"/>
<tx:method name="a*" propagation="REQUIRED"/>
<tx:method name="d*" propagation="REQUIRED"/>
<tx:method name="e*" propagation="REQUIRED"/>
<tx:method name="*" propagation="SUPPORTS" read-only="true"/>
</tx:attributes>
</tx:advice>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: