zoukankan      html  css  js  c++  java
  • package com.nps.base.xue.xd.groovyEngine import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.nps.common.service.NpsApplicationContextHolder import com.nps.data_api.service

    原因:

    Switch this to "false" to let the transaction originator make the rollback decision. If a participating transaction fails with an exception, the caller can still decide to continue with a different path within the transaction. However, note that this will only work as long as all participating resources are capable of continuing towards a transaction commit even after a data access failure: This is generally not the case for a Hibernate Session, for example; neither is it for a sequence of JDBC insert/update/delete operations.

    大意是:如果isGlobalRollbackOnParticipationFailure为false,则会让主事务决定回滚,如果当遇到exception加入事务失败时,调用者能继续在事务内决定是回滚还是继续。然而,要注意是那样做仅仅适用于在数据访问失败的情况下且只要所有操作事务能提交。

    初步解决方案:

    <bean id="transactionManager"class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
    <property name="globalRollbackOnParticipationFailure" value="false" /> 
    <!--指定此参数为false-->
    
    </bean>
    

      

  • 相关阅读:
    搜索引擎判断跳转
    NPOI 2.0 教程(二):编辑既存的EXCEL文件
    linux服务器性能状态查看
    买服务器网址
    最全的蜘蛛
    CentOS中配置lvm存储
    CentOS中对ext4文件系统做磁盘配额
    CentOS中配置SoftWareRaid磁盘冗余阵列
    CentOS添加磁盘分区
    CentOS源码包安装apache、nginx服务
  • 原文地址:https://www.cnblogs.com/xww115/p/11456163.html
Copyright © 2011-2022 走看看