TransactionReaper::check timeout for TX

        我使用Jboss5.1GA版本发布EJB项目,在执行一个定时任务时,数据量比较大,执行中断并报错:

2023-02-08 09:00:38,949 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-9) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -3f57c78a:df4f:63e2f232:74 in state  RUN
2023-02-08 09:00:38,950 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57c78a:df4f:63e2f232:74 invoked while multiple threads active within it.
2023-02-08 09:00:38,950 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57c78a:df4f:63e2f232:74 aborting with 1 threads active!
2023-02-08 09:00:39,016 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_7] - TransactionReaper::doCancellations worker Thread[Thread-10,5,jboss] successfully canceled TX -3f57c78a:df4f:63e2f232:74
2023-02-08 09:00:39,040 ERROR [org.jboss.aspects.tx.TxPolicy] (WorkerThread#0[127.0.0.1:57479]) javax.ejb.EJBTransactionRolledbackException: org.hibernate.SessionException: Session is closed!

        这里我的解决办法是修改jboss事务超时时间,修改 ~\jboss-5.1.0.GA\server\default\deploy下的 transaction-jboss-beans.xml 配置文件:

TransactionReaper::check timeout for TX_第1张图片

 将其中的 300 参数值加大,我设置成 1800,这里单位是 秒

你可能感兴趣的:(JBoss,Jboss)