使用EJB2.1的Apache TomEE CMT不会在RemoteException上回滚事务

时间:2015-08-11 14:24:33

标签: containers rollback managed tomee

我在EJB2.1规范中有一个EJB。这是一个CMT。发生异常时抛出RemoteException,但事务不回滚。我正在使用的流程是调用2个存储过程,它们都包含DML语句。

当我调用第二个存储过程时发生错误,但是我看到第一个存储过程DML被执行并且数据仍然存在。

我配置数据源和事务管理器的tomee.xml

<tomee>
  <Deployments dir="apps" />
<Resource id="TPDDS" type="DataSource">    
    JdbcDriver=com.jnetdirect.jsql.JSQLDriver
    JdbcUrl=jdbc:JSQLConnect://dbamigratedb/database=dev1DB/ssl=mandatory
    UserName=dbuser
    Password=dbpass
    jtaManaged=true
    maxWaitTime=30000
    maxActive=100
    testOnBorrow=true
</Resource>
<TransactionManager id="myTransactionManager" type="TransactionManager">
    adler32Checksum = true
    bufferSizeKb = 32
    checksumEnabled = true
    defaultTransactionTimeout = 10 minutes
    flushSleepTime = 50 Milliseconds
    logFileDir = txlog
    logFileExt = log
    logFileName = howl
    maxBlocksPerFile = -1
    maxBuffers = 0
    maxLogFiles = 2
    minBuffers = 4
    threadsWaitingForceThreshold = -1
    txRecovery = true
</TransactionManager>
</tomee>

0 个答案:

没有答案