3 Replies Latest reply on Apr 15, 2009 6:25 PM by prasanthreddy

    Setting transaction timeout in JBoss 5.0.1.GA

    prasanthreddy

      I have been using 4.0.5 and I have modified /jboss4.0.5.GA/server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml to set the transaction timeout.

      <mbean code="org.jboss.remoting.transport.Connector"
      name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
      <depends>jboss.aop:service=AspectDeployer</depends>
      <attribute name="Configuration">
      <config>
      <invoker transport="socket">
      <attribute name="numAcceptThreads">1</attribute>
      <attribute name="maxPoolSize">300</attribute>
      <attribute name="clientMaxPoolSize" isParam="true">50</attribute>
      <attribute name="socketTimeout" isParam="true">600000</attribute>
      <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
      <attribute name="serverBindPort">3873</attribute>
      <attribute name="backlog">200</attribute>
      </invoker>


      How do I accomplish the same in JBoss 5.0.1 GA?

      Appreciate your help.

      -Prasanth.


        • 1. Re: Setting transaction timeout in JBoss 5.0.1.GA
          prasanthreddy

          Please ignore the above post.

          The file I modified is jboss-4.0.5.GA/server/default/conf/jboss-service.xml

          <mbean code="org.jboss.tm.TransactionManagerService"
           name="jboss:service=TransactionManager"
           xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
           <attribute name="TransactionTimeout">1800</attribute>
           <!-- set to false to disable transaction demarcation over IIOP -->
           <attribute name="GlobalIdsEnabled">true</attribute>
           <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
          
           <!-- Transaction Integrity Checking -->
           <!-- Force a rollback if another thread is associated with the transaction at commit -->
           <!--depends optional-attribute-name="TransactionIntegrityFactory"
           proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory">
           <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction"
           name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>
           </depends-->
           </mbean>
          


          • 2. Re: Setting transaction timeout in JBoss 5.0.1.GA
            peterj

            In 5.0.x (and 4.2.x), transactions are configured in the server/xxx/conf/jbossjta-properties.xml file. I think the txReaperTimeout is what you are looking for. Here are the docs: http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/html/JBoss_TS_Programmers_Guide/ch03.html#d0e1516

            • 3. Re: Setting transaction timeout in JBoss 5.0.1.GA
              prasanthreddy

              Thanks for the link.

              Seems like the reaperTimeout is the sleep time for the reaper itself.
              com.arjuna.ats.arjuna.coordinator.defaultTimeout seems to be the maximum time a transaction can take before getting rolled back by the reaper.

              I tried setting the defaultTimeout but didn't see like it worked.

              In the deploy folder there is a file called transaction-jboss-beans.xml in this file I have set transactionTimeout that did the trick.


               <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">1800</property>
               <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
               <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>