当我使用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是谁避免这个问题,修复或做一个变通方法?