Jboss 4.2.3事务超时10分钟后

时间:2012-10-29 15:21:33

标签: jboss

我在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

非常感谢!

1 个答案:

答案 0 :(得分:2)

我找到了解决方案:

进入:“jboss \ server \ default \ conf \ jboss-service.xml”行: 1200 (默认为300)

然后

进入: “的JBoss \服务器\默认\部署\ EJB3拦截器-aop.xml文件”

find:idleTimeoutSeconds = 300

替换为:idleTimeoutSeconds = 1800

有4次出现,全部替换。