GH-1309: Don't Bind Resource When Sync Not Active
Resolves https://github.com/spring-projects/spring-amqp/issues/1309 If the `RabbitTemplate` was called from a `@TransactionalEventListener`, with phase `AFTER_COMMIT`, a transaction is "active", but synchronizations are already cleared. It is too late to synchronize this transaction. We end up with an orphaned `ResourceHolder` with pending transaction commits. Don't bind the resource holder if synchronization is not active. However, the proper solution, if users want to synchronize the rabbit transaction with the global transaction, is to use the `BEFORE_COMMIT` phase. See the discussion on the Github issue for more information. **cherry-pick to 2.2.x** * Fix since version. * Reset physical close required flag left over from another test. * Capture test results for all modules.
This commit is contained in:
3
.github/workflows/pr-build-workflow.yml
vendored
3
.github/workflows/pr-build-workflow.yml
vendored
@@ -30,8 +30,9 @@ jobs:
|
||||
arguments: check
|
||||
|
||||
- name: Capture Test Results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results
|
||||
path: spring-rabbit/build/reports/tests
|
||||
path: '*/build/reports/tests/**/*.*'
|
||||
retention-days: 3
|
||||
|
||||
Reference in New Issue
Block a user