我的 jboss 上运行了一个很长的事务(超过 10 分钟)。此事务在 10 分钟后始终失败。我改变了我的 jboss-service.xml 如下:
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
name="jboss:service=TransactionManager">
<attribute name="TransactionTimeout">1200</attribute>
<attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
</mbean>
我还更改了 standardjboss.xml 中的最大 bean 年龄(10 次):
<max-bean-age>1600</max-bean-age>
默认情况下设置为 600(10 分钟),但 1600 仍然会出现问题。
一些日志:在交易过程中我已经收到了数千次:
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> enterCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << enterCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> leaveCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << leaveCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,115 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2
当它失败时:
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> enterCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << enterCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> leaveCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << leaveCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,975 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Attempting to activate; id=4spxl-oj441k-h8vp9pzg-1-h8vpcqc2-p
2012-10-29 15:58:13,100 ERROR [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Error during sync listener execution
javax.ejb.NoSuchEJBException: Could not find stateful bean: 4spxl-oj441k-h8vp9pzg-1-h8vpcqc2-p
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
有人能帮我吗 ?
这里有一个相关的帖子,但没有解决方案:https ://community.jboss.org/thread/159596
非常感谢 !