1 Reply Latest reply on May 16, 2002 11:47 PM by matthew.james

    Transaction timeout not working in jboss2.4.4

    nsdeonia

      Hi

      I am using JBoss2.4.4 on an NT machine and using a Stateful session bean. I have written the following code :

      mUserTransaction = mEjbContext.getUserTransaction();
      mUserTransaction.begin();
      mUserTransaction.setTransactionTimeout(2);
      //Calling methods of another beans
      -------
      //Delay of more than 2 seconds

      //Calling methods of another beans
      -------
      mUserTransaction.commit();
      timeout does not work but insead it is commiting the transaction.

      I am using this bean to test working of transaction timeout.
      Can any body tell where i am going wrong?
      Is this a bug in JBoss?

      Thanks in advance for any help.


      Regards
      Narinder.

        • 1. Re: Transaction timeout not working in jboss2.4.4
          matthew.james

          Narinder

          We have been having similar problems with transaction timeouts. What we have found is that they do seem to work if the timeout is specified *before* the begin, ie:

          mUserTransaction = mEjbContext.getUserTransaction();
          mUserTransaction.setTransactionTimeout(2);
          mUserTransaction.begin();

          We're still looking into the root cause fir this, but it seems to work for now.

          Matt