Skip to content

GH-646: Transaction Improvements #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2018

Conversation

garyrussell
Copy link
Contributor

@garyrussell garyrussell commented Apr 13, 2018

Resolves #646

  • add protection to the transactional producer cache to avoid multiple cache inserts
  • add try/catch around abortTransaction()
  • detect (and reject) an illegal call to template.send() when there is no existing transaction
  • from the send callback remove the ThreadLocal check (will always be null) and only close the producer if it's not transactional
  • remove autoFlush from template tests

cherry-pick to 2.1.x_, 2.0.x, 1.3.x

Resolves spring-projects#646

- add protection to the transactional producer cache to avoid multiple cache inserts
- add try/catch around `abortTransaction()`
- detect (and reject) an illegal call to `template.send()` when there is no existing transaction
- from the send callback remove the `ThreadLocal` check (will always be null) and only close the producer if it's not transactional
- remove autoFlush from template tests
@artembilan
Copy link
Member

... and cherry-picked to 2.1.x and 2.0.x.
Back-ported to 1.3.x as 79510ec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect that a send() operation is being performed when no transaction exists
2 participants