Uploaded image for project: 'Agroal'
  1. Agroal
  2. AG-168

Close connection wrappers on rollback without emitting a warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.10
    • Fix Version/s: 1.11
    • Component/s: api, narayana, pool
    • Labels:
      None

      Description

      From the javadoc of `javax.transaction.Shyncronization`: 

      This method is invoked before the start of the commit process. The method invocation is done in the context of the transaction that is about to be committed.
      

      Frameworks that rely on `Synchronization` to close connections will not get that callback on rollback, and therefore can't avoid a warning from Agroal when it closes those connections prior to rollback.

      The current methods on `io.agroal.api.TransactionIntegration` are not enough to convey the information to the pool that the transaction is about to complete. Adding a `transactionBeforeCompletetion` with the expected transaction outcome, will not only streamline the process on the pool but also make the commit procedure more consistent between XA and non-XA use cases. 

      NOTE: The warnings may be reinstated in a future version

        Attachments

          Activity

            People

            Assignee:
            lbarreiro Luis Barreiro
            Reporter:
            lbarreiro Luis Barreiro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: