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

Close connection wrappers on rollback without emitting a warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.11
    • 1.10
    • api, narayana, pool
    • None
    • False
    • False
    • Undefined

      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

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

                Created:
                Updated:
                Resolved: