Multi resource XA transactions sometimes act incorrectly [SPR-12535] #17140
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: invalid
An issue that we don't feel is valid
Trevor Stevens opened SPR-12535 and commented
When using XA Transactions sometimes messages are delivered to the queue before they are committed to the database. We have attempted the following within both TomEE and Wildfly and have been able to reproduce this issue in both. I'm attaching a sample project which should allow others to reproduce this as well.
Expected operation, each step represents a seperate XA transaction.
@Service
send JMSMessage using JMSTemplateMy thought was that within an XA transaction both the JPA persist and the JMS send must complete before the transaction can commit successfully. We have been trying to tackle a strange case where after the listener for #2 completes the message from #2 is then delivered to #3 but the ID is not present in the database yet and the entity cannot be retreived.
I'm attaching a snippent from a log showing both a passing and failing case of the above steps. Since we have been unable to find any fault with our configuration and due the intermittent nature of this we can only assume that a bug exists somewhere within Springs handling of XA transactions.
Affects: 3.2.12
Reference URL: https://github.com/jej2003/simple-spring
Attachments:
The text was updated successfully, but these errors were encountered: