5 Replies Latest reply on Dec 19, 2003 6:12 PM by juha

    EJB transaction timeout

    ilballa

      Hi,

      I would like to know if it is possible to specify the transaction timeout for a single bean.

      I use Oracle 8.1.7 and I configure the transaction manager in the standard way:


      300
      oracle.jdbc.xa.OracleXid


      Quoting the documentation: "TransactionTimeout: The default transaction timeout in seconds. The default value is 300 seconds."
      As long as this is a default I suppose it can be set arbitrary for every bean, but I did not figure out how.

      Could anybody please help me ? Either explaining me how to set the transaction timeout for every bean or by confirming me that it is not possible.

      Thanks in advance.

        • 1. Re: EJB transaction timeout

          I would like to bring this question back to everybody's attention since I'm also not yet able to solve that problem. (Setting the default timeout to a huge value is ok right now, but I prefer to change that before I go into production)

          So is it possible to set different transaction timeouts for some beans or am I just too blind to find the answer somewhere?

          Thank's for any help!

          • 2. Re: EJB transaction timeout
            cvandyck

            Hi,

            I would also really like to know if this is possible, as I have multiple different transactional needs within the same application.

            thanks-

            • 3. Re: EJB transaction timeout
              wwheeler1464

              Funny, this was my question too and it's the very first question in the forum. :-)

              Also, shouldn't there be a forum for transactions?

              • 4. Re: EJB transaction timeout
                wwheeler1464

                p.s. I tried doing

                sessionCtx.getUserTransaction()

                since that has a method setTransactionTimeout(). But JBoss reports that CMT beans aren't allowed to call that method. I would like to continue to use CMT, so my guess (like the guys before me) is that the default timeout is configurable...

                Willie

                • 5. Re: EJB transaction timeout

                  The timeout is global, and is the same for all beans. BMT should work, although I haven't tried it myself.