oracle xa事务 java_java – JBOSS:使用Atomikos在Oracle XA Transaction上冻结线程

当我使用atomikos和hibernate传输一些数据时,我在应用程序上的某个时间后出现错误.

2015-11-06 07:11:56,353 WARN [http-/0.0.0.0:8083-10] datasource.xa.XAResourceTransaction - XA resource 'COTXADBMS': resume for XID '31302E3235332E312E35322E746D30303030313030303939:31302E3235332E312E35322E746D31' raised -7: the XA resource has become unavailable - (Slf4jLogger.java:24)

oracle.jdbc.xa.OracleXAException

at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1110)

at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:240)

at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:427)

at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.

然后我们抓住了“冻结”

"http-/0.0.0.0:8083-2" daemon prio=10 tid=0x0000000001914800 nid=0x7640 runnable [0x0000000045ff8000]

java.lang.Thread.State: RUNNABLE

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(SocketInputStream.java:152)

at java.net.SocketInputStream.read(SocketInputStream.java:122)

at oracle.net.ns.Packet.receive(Packet.java:300)

at oracle.net.ns.DataPacket.receive(DataPacket.java:106)

at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)

at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)

at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)

at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)

at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)

at oracle.jdbc.driver.T4CTTIOtxse.doOTXSE(T4CTTIOtxse.java:163)

at oracle.jdbc.driver.T4CXAResource.doStart(T4CXAResource.java:186)

- locked <0x000000078e7f7a40> (a oracle.jdbc.driver.T4CConnection)

at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:228)

- locked <0x000000078e7f7a40> (a oracle.jdbc.driver.T4CConnection)

at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:427)

- locked <0x00000007ea3500c8> (a com.atomikos.datasource.xa.XAResourceTransaction)

at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.

它发生在连接处于活动状态的一段时间后,即使不使用这种情况也会发生.

设置 – spring applicationXML

diobjectfactorybean">

factorybean">

sql">truefactorybean" class="com.atomikos.jms.AtomikosConnectionfactorybean" init-method="init" destroy-method="close">

factorybean" />

diobjectfactorybean">

factorybean">

sql">true

anonyone是谁避免这个问题,修复或做一个变通方法?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值