Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1421 Implement JTS
  3. JBAS-2085

Check TransactionServiceImpl::get_txcontext()

    XMLWordPrintable

Details

    Description

      The method TransactionServiceImpl::get_txcontext() needs checking.
      I'm not sure what semantics it should have when used for an "invalid",
      e.g. committed, rolledback or marked rollback transaction?

      I'm currently changing the method TransactionImpl.tx.getTimeLeftBeforeTimeout() to have clearer
      semantics for use elsewhere, i.e.
      TransactionImpl.tx.getTimeLeftBeforeTimeout(boolean errorRollback) throws RollbackException
      with an error being raised if the transaction is not active and the parameter is true.

      so this code becomes (for backwards compatibility)
      try

      { pc.timeout = divideAndRoundUp(tx.getTimeLeftBeforeTimeout(false), 1000); }

      catch (RollbackException e)

      { throw new UnreachableStatementException(); }

      But as this stands, it could produce a negative or meaningless value in some circumstances?

      Attachments

        Activity

          People

            reverbel Francisco Reverbel (Inactive)
            adrian.brock Adrian Brock (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: