Jboss Fuse Aries XA transactions issue. XA Datasource is setup using Aries-XA auto enlistment.
用于公开数据源的 Blueprint-xml
<service interface="javax.sql.XADataSource" ref="oracle-XA-DB">
<service-properties>
<entry key="datasource.name" value="oracleXADB" />
<entry key="aries.xa.name" value="oracle-XA-DB" />
<entry key="aries.xa.username" value="${datasource.user}" />
<entry key="aries.xa.password" value="${datasource.password}" />
<entry key="aries.xa.pooling" value="true" />
<entry key="aries.xa.poolMinSize" value="0" />
<entry key="aries.xa.poolMaxSize" value="10" />
<entry key="aries.xa.exceptionSorter" value="known" />
<entry key="aries.xa.transaction" value="none" />
</service-properties>
</service>
This datasource exposed is retrieved using mybatis-component to execute the database operations. The XA commit, roll-backs are working fine for the initial few transactions. Later, the entire bundles dependent upon the datasource fails with the following exception. Once, the bundles are restarted, the services are working fine, but only for a limited time.
堆栈跟踪 org.apache.camel.impl.DefaultMessage|方法名称:autoSave|日志数据:异常错误消息|异常消息:JTA 事务意外回滚(可能是由于超时);嵌套异常是javax.transaction.RollbackException:无法提交:事务标记为回滚|异常堆栈跟踪:org.springframework.transaction.UnexpectedRollbackException:JTA事务意外回滚(可能是由于超时);嵌套异常是 javax.transaction.RollbackException:无法提交:在 org.springframework.transaction.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1015) 处标记为回滚的事务在 org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager .java:755) 在 org.springframework.transaction。