zoukankan      html  css  js  c++  java
  • atomikos的Jta配置

    配置说明见:

    http://www.atomikos.com/Documentation/JtaProperties

    atomikos的一些配置,文档中说明的比较清楚,有两个属性配置不太明确:
    com.atomikos.icatch.max_timeout、com.atomikos.icatch.default_jta_timeout都是关于事务超时的,验证了一下第一个配置有效的,当事务运行时间超过该时间配置时,会抛错。
    com.atomikos.jdbc.AtomikosSQLException: Transaction is marked for rollback only or has timed out
    at com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:46)
    at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:233)
    at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142)
    at com.sun.proxy.$Proxy1.prepareStatement(Unknown Source)
    at XAMain.modifyAccountBMoney(XAMain.java:117)
    at XAMain.transeMoney(XAMain.java:65)
    at XAMain.main(XAMain.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
    Caused by: com.atomikos.datasource.xa.session.InvalidSessionHandleStateException: Transaction is marked for rollback only or has timed out
    at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:57)
    at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88)
    at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179)
    at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:223)
    ... 10 more

    而第二个参数则没什么用,查看开源的代码也没有看到使用第二个配置。

  • 相关阅读:
    3164 质因数分解
    codevs3249搭积木
    codevs 2964公共素数因数
    爱改名的小融1
    单链表基础练习
    并查集(union-find sets)
    string类中字符的大小写转换
    蒜头君学英语--set()练习
    打印锯齿矩阵
    堆积木
  • 原文地址:https://www.cnblogs.com/macula7/p/5188120.html
Copyright © 2011-2022 走看看