Uploaded image for project: 'Hibernate OGM'
  1. OGM-1471

Use the isActive() method to check if a transaction is still active

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.0.Alpha1
    • Fix Version/s: 5.4.0.Beta1
    • Component/s: tests
    • Labels:
      None

      Description

      In many test we use the clause:

      if (transaction.getStatus() == TransactionStatus.ACTIVE) {
        transaction.rollback();
      }
      

      to check and rollback an active transaction.
      But this clause does not rollback the transaction if the status was *MARKED_ROLLBACK*.

      This approach seems to bring some temporary inconsistency problems on test.

      We need to use the isActive() method to make sure that we don't miss statuses that are still considered active in the future.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: