`
jackroomage
  • 浏览: 1198070 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类

Spring 事务管理 <tx:method/> 有关的设置

 
阅读更多

来源:

http://blog.sina.com.cn/s/blog_4a40057401000865.html

 

<tx:method/> 有关的设置
  
    <tx:advice id="defaultTxAdvice">
        <tx:attributes>
            <tx:method name="get*" read-only="true"/>
            <tx:method name="*"/>
        </tx:attributes>
    </tx:advice>
9.5.5. <tx:advice/> 有关的设置

这一节里将描述通过 <tx:advice/> 标签来指定不同的事务性设置。默认的 <tx:advice/> 设置如下:

    事务传播设置是 REQUIRED

    隔离级别是 DEFAULT

    事务是 读/写

    事务超时默认是依赖于事务系统的,或者事务超时没有被支持。

    任何 RuntimeException 将触发事务回滚,但是任何 checked Exception 将不触发事务回滚

这些默认的设置当然也是可以被改变的。 <tx:advice/> 和 <tx:attributes/> 标签里的 <tx:method/> 各种属性设置总结如下:

 



 

  • 大小: 44.5 KB
分享到:
评论

相关推荐

    springmvcmybatis

    -- (事务管理)transaction manager, use JtaTransactionManager for global tx --&gt; &lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt; &lt;property ...

    Spring2.5和Hibernate3集成--学习spring aop ioc

    &lt;tx:method name="add*" propagation="REQUIRED"/&gt; &lt;tx:method name="del*" propagation="REQUIRED"/&gt; &lt;tx:method name="modify*" propagation="REQUIRED"/&gt; &lt;tx:method name="*" read-only="true"/&gt; &lt;/tx:...

    spring applicationContext 配置文件

    &lt;tx:method name="update*" propagation="REQUIRED"/&gt; &lt;tx:method name="*" read-only="true"/&gt; &lt;/tx:attributes&gt; &lt;/tx:advice&gt; &lt;!-- 那些类的哪些方法参与事务 --&gt; &lt;aop:config&gt; &lt;aop:pointcut id=...

    JTA事务源码示例

    &lt;tx:method name="delete*" rollback-for="Exception"/&gt; &lt;tx:method name="save*" rollback-for="Exception"/&gt; &lt;tx:method name="update*" rollback-for="Exception"/&gt; &lt;tx:method name="*" read-only="true" ...

    springmvc-ibatis

    &lt;?xml version="1.0" encoding="UTF-8"?... &lt;tx:method name="delete*" propagation="REQUIRED"/&gt; &lt;tx:method name="*" propagation="REQUIRED"/&gt; &lt;/tx:attributes&gt; &lt;/tx:advice&gt; &lt;/beans&gt;

    ssh框架在application.xml中配置数据源所需jar

    &lt;tx:method name="modify*" propagation="REQUIRED"/&gt; &lt;tx:method name="*" read-only="true"/&gt; &lt;/tx:attributes&gt; &lt;/tx:advice&gt; &lt;!-- 那些类的哪些方法参与事务 --&gt; &lt;aop:config&gt; &lt;aop:advisor ...

    SSH第7章上机.zip ACCP8.0

    &lt;tx:method name="delete*" propagation="REQUIRED"/&gt; &lt;tx:method name="*" read-only="true" /&gt; &lt;!-- 或者 &lt;tx:method name="*list*" read-only="true"/&gt; &lt;tx:method name="*get*" read-only="true"/&gt; &lt;tx:...

    Maven拆分代码.zip

    &lt;tx:method name="update*" propagation="REQUIRED"/&gt; &lt;tx:method name="delete*" propagation="REQUIRED"/&gt; &lt;tx:method name="find*" read-only="true"/&gt; &lt;tx:method name="*" propagation="REQUIRED"/&gt; &lt;/tx:...

    SpringMVC+Hibernate全注解整合

    &lt;tx:method name="update*" propagation="REQUIRED" /&gt; &lt;tx:method name="delete*" propagation="REQUIRED" /&gt; &lt;tx:method name="*" propagation="REQUIRED" /&gt; &lt;/tx:attributes&gt; &lt;/tx:advice&gt; &lt;!--...

    Spring3中配置DBCP,C3P0,Proxool,Bonecp数据源

    &lt;bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource" destroy-method="close"&gt; &lt;property name="driver"&gt; &lt;value&gt;org.gjt.mm.mysql.Driver&lt;/value&gt; &lt;/property&gt; &lt;property name=...

    SpringMVC-SSH全注解

    import javax.persistence.Column; ... &lt;tx:method name="delete*" propagation="REQUIRED" /&gt; &lt;tx:method name="*" propagation="REQUIRED" /&gt; &lt;/tx:attributes&gt; &lt;/tx:advice&gt; &lt;/beans&gt;

    spring3.2+strut2+hibernate4

    -- JTA环境的事务配置 &lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager or WebLogicJtaTransactionManager"/&gt; --&gt; &lt;!-- 使用annotation定义事务 --&gt; &lt;tx:...

    客户关系管理系统框架搭建(二)

    --4 创建事务管理器 aop切面--&gt; &lt;bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt; &lt;property name="sessionFactory" ref="sessionFactory"/&gt; &lt;/bean&gt;...

    Activiti6.0教程例子下载

    &lt;bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"&gt; &lt;property name="dataSource" ref="dataSource" /&gt; &lt;property name="transactionManager" ref=...

    Spring中文帮助文档

    9.5.5. &lt;tx:advice/&gt; 有关的设置 9.5.6. 使用 @Transactional 9.5.7. 事务传播 9.5.8. 通知事务操作 9.5.9. 结合AspectJ使用 @Transactional 9.6. 编程式事务管理 9.6.1. 使用TransactionTemplate 9.6.2. ...

    Spring API

    9.5.5. &lt;tx:advice/&gt; 有关的设置 9.5.6. 使用 @Transactional 9.5.7. 事务传播 9.5.8. 通知事务操作 9.5.9. 结合AspectJ使用 @Transactional 9.6. 编程式事务管理 9.6.1. 使用TransactionTemplate 9.6.2. ...

    spring chm文档

    9.5.5. &lt;tx:advice/&gt; 有关的设置 9.5.6. 使用 @Transactional 9.5.7. 插入事务操作 9.5.8. 结合AspectJ使用 @Transactional 9.6. 编程式事务管理 9.6.1. 使用 TransactionTemplate 9.6.2. 使用 ...

Global site tag (gtag.js) - Google Analytics