1 Reply Latest reply on Nov 23, 2009 3:46 AM by Jonathan Halliday

    TransactionManager.getTransactionTimeout() returns 0

    blabno Master

      I've tried to call

      ((TransactionManagerDelegate)new InitialContext().lookup("java:/TransactionManager")).getTransactionTimeout()


      while on debug and it returned 0 !

      When I set it via Transaction.setTimeout it returns expected (set) value.

      How shall I interpret this zero value ? In jboss-service.xml it is set to 300.

        • 1. Re: TransactionManager.getTransactionTimeout() returns 0
          Jonathan Halliday Master

          In accordance with the semantics of the JTA's setTransactionTimeout method, a 0 values means 'no explicit timeout has been associated to the Thread, so the default applies'. This allows you to distinguish cases where the default is in effect from those where an explicit value that happens to be the same as the default has been set. It does however leave you with the headache of figuring out how to get the default value...