5 Replies Latest reply on Jun 20, 2011 2:55 AM by lukast

    JBoss 5.1.0 transaction timeout > 1 hour problem

    lukast Newbie

      Hi all,

       

      I have exactly the same problem as the one desribed here. I cannot set the transaction timeout greater than 1 hour. In JMX console it is showed properly, but the transactions are always being timeouted after one our. Appreciate your help ! Thanks.:

       

      http://markmail.org/message/tbdl3xz7ahtxcwgm

       

      I have a problem when changing the transaction timeout via transaction-jboss-beans.xml. Here's what I have (AS 5.0.1GA): 

      <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss:bean-deployer:2.0"> 

           <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService"> 

      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation> 

               <property name="transactionTimeout">10800</property> <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property> <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property> 

      ... 

      I'm trying to set it to 3 hours. I changed it months ago in the same codebase from the default 5 minutes to 60 minutes and that worked. All I had to do was set "transactionTimeout" to 3600. Now in our production environment, we realize 60 min is not enough and want to extend it again. Now the change is not taking effect anymore!! 

      I verified in the jmx-console that the value is getting set, but it's still timing out after EXACTLY one hour. I've done the obvious like bounce the server, try different timeout values, and nothing. 

      Is there somewhere this is cached outside of memory or using environment variables or something overriding my change and keeping it at 3600? 

        • 1. Re: JBoss 5.1.0 transaction timeout > 1 hour problem
          Wolf-Dieter Fink Master

          If your change become active if you use '120' and '3600' there is no environment which override your setting.

          But what kind of error occour?

          Maybe the database or an other party can not work with a Tx>1h.

           

          Could you post the Exception?

          • 2. Re: JBoss 5.1.0 transaction timeout > 1 hour problem
            lukast Newbie

            Yes, actually this is the exception. I happens exactly after 1 hour the transaction began. The database is Postgresql. The transaction begins in JMS MessageListener that is annotated with REQUIRED transactional attribute. JMS implementation used is JBoss Messaging (the one delivered together with JBoss 5.1.0)

             

            at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                    at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)

                    at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)

                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)

                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)

                    at $Proxy462.distpachSystemRequest(Unknown Source)

                    at ...

                    at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                    at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)

                    at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)

                    at ...

                    at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)

                    at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)

                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)

                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)

                    at $Proxy610.handleSystemRequest(Unknown Source)

                    at ...

                    at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                    at java.lang.Thread.run(Thread.java:619)

            Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.SessionException: Session is closed!

                    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)

                    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)

                    at org.jboss.ejb3.tx.TxInterceptor$Mandatory.invoke(TxInterceptor.java:143)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)

                    at $Proxy602.findActiveSubscriptionsByContentProfile(Unknown Source)

                    at ...

                    ... 173 more

            Caused by: javax.persistence.PersistenceException: org.hibernate.SessionException: Session is closed!

                    at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)

                    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)

                    at ...

                    at sun.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)

                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

            [       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)

                    ... 195 more

            Caused by: org.hibernate.SessionException: Session is closed!

                    at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)

                    at org.hibernate.impl.SessionImpl.getPersistenceContext(SessionImpl.java:1850)

                    at org.hibernate.event.def.ProxyVisitor.processEntity(ProxyVisitor.java:50)

                    at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:127)

                    at org.hibernate.event.def.WrapVisitor.processValue(WrapVisitor.java:121)

                    at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:78)

                    at org.hibernate.event.def.DefaultFlushEntityEventListener.wrapCollections(DefaultFlushEntityEventListener.java:215)

                    at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:148)

                    at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)

                    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)

                    at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)

                    at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)

                    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)

                    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

                    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)

                    ... 226 more

            • 3. Re: JBoss 5.1.0 transaction timeout > 1 hour problem
              Wolf-Dieter Fink Master

              Mmmh,

              I think that is what I suppose, not the JBoss TxManager (for which the configuration is) reach the timeout.

               

              In this case it looks like that hibernate close the session, maybe here is a different configuration that must be changed or it is hardcoded and can not changed?!

              Maybe a hibernate guy might help here!

              • 4. Re: JBoss 5.1.0 transaction timeout > 1 hour problem
                lukast Newbie

                Also, before this exception there are such warns in server.log. How about these warns ? Maybe they clarify something ?:

                 

                2011-06-10 13:00:00,130 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N]  [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - Trans

                actionReaper::check timeout for TX adb7d0f:e166:4df1107e:95639 in state  RUN

                2011-06-10 13:00:00,145 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N]  [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of ac

                tion id adb7d0f:e166:4df1107e:95639 invoked while multiple threads active within it.

                2011-06-10 13:00:00,145 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N]  [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAct

                ion::check - atomic action adb7d0f:e166:4df1107e:95639 aborting with 1 threads active!

                • 5. Re: JBoss 5.1.0 transaction timeout > 1 hour problem
                  lukast Newbie

                  Anyone has any suggestions ? Still did not solve this issue..