Skip to content

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