2 Replies Latest reply on May 11, 2004 10:41 PM by Guy Daniel

    Stateful Transaction Timeout

    jagertee Newbie

      Greetings. I have a stateful session bean that I wish to set a timeout value for (e.g. if the user goes away to write a novel I want it to eventually timeout). I am also doing the appropriate remove at the end of the transaction sequence.

      Not sure where to set this in JBOSS. I've been using Jrun recently and they have an ejb-jar.xml specific to Jrun (alongside the std one) which is as follows...

      <jrun-ejb-jar>
       <enterprise-beans>
       <!-- AffidavitFacade is a stateful session bean-->
       <session>
       <ejb-name>AffidavitFacade</ejb-name>
       <jndi-name>AffidavitFacade</jndi-name>
       <timeout>1800</timeout>
       </session>
       </enterprise-beans>
      </jrun-ejb-jar>
      


      Is there somewhere in JBOSS I can define something similar - or is it a global setting (not for the specific EJB as above)(which would be OK).

      Using Jboss 3.2.3 accessing Oracle8, client coming in via Tomcat.

      Thanks gurus!
      Rob


        • 1. Re: Stateful Transaction Timeout
          perfectdaytochasetornados Newbie

          Yes, I would also like to know how to change the timeouts. I even bought the documentation, but can't find it in there either???


          :-)
          P

          • 2. Re: Stateful Transaction Timeout
            Guy Daniel Newbie


            I found this in the 3.2.4 list of tasks to be done....

            CMT transaction timeout overrides is done.

            It is configured using method attributes in jboss.xml (values are in seconds), e.g.
            Code:



            <enterprise-beans>

            <ejb-name>TxTimeout</ejb-name>
            <jndi-name>jbosstest/tm/TxTimeout</jndi-name>
            <method-attributes>

            <method-name>testOverriddenTimeoutExpires</method-name>
            <transaction-timeout>5</transaction-timeout>


            <method-name>testOverriddenTimeoutDoesNotExpire</method-name>
            <transaction-timeout>20</transaction-timeout>

            </method-attributes>

            </enterprise-beans>