Arjuna JTA交易出乎意料地回滚

Oli*_*ger 10 java jboss transactions jms

当我检查JBoss日志时,我发现了很多这些错误

2012-03-29 12:01:27,358 WARN  @ [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 32, 30, 1--53e2af7c:eff6:4ec11bf7:2e1da4-53e2af7c:eff6:4ec11bf7:2e263d                                                                   >
2012-03-29 12:01:27,398 WARN  @ [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 31, 29, 1--53e2af7c:d397:4e8c1b0e:25b6d-53e2af7c:d397:4e8c1b0e:29d09                                                                     >
Run Code Online (Sandbox Code Playgroud)

然后,当我尝试发送JMS消息时,我看到了这个错误:

2012-03-29 12:02:43,778 WARN  @ [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.opcerror] [com.arjuna.ats.internal.jta.resources.arjunacore.opcerror] XAResourceRecord.commit_one_phase caught: java.lang.IllegalMonitorStateException
2012-03-29 12:02:43,778 WARN  @ [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed for destination 'queue/request' - trying to recover. Cause: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
Run Code Online (Sandbox Code Playgroud)

我怀疑回滚是先前错误的结果.我对吗 ?什么可能导致交易保持这样的中止状态?

环顾四周我发现这篇文章:是什么导致Arjuna 1603(无法找到新的XAResource用于恢复非可序列化的XAResource) .我知道有一些交易日志已经保留,但这并没有解释如何解决我现在的问题.

dro*_*.ah 2

我在 JBoss 5.1 上看到过类似的错误(至少第二个是指超时)

我们没有找到实际原因,但很可能是由于长时间运行的事务被“收获”造成的

我们得出这个结论的原因是我们在高负载时看到了这一点,并且某些操作需要很长时间才能完成。

我们使用 PostgreSQL,有很多连接“在事务中等待”,这些连接在收获后会被清除。检查配置中的事务超时并将其设置为更高的值,看看是否可以缓解问题。

https://community.jboss.org/wiki/TransactionTimeout介绍了如何管理此设置。