JMS and Java EE
The standard (recommended?) way to integrate with a message broker from a Java EE application using the JMS API is with a Resource Adapter (RA). This comes with the added benefit of being able to switch the underlying broker in future, with little effort.
XA transactions and alternatives
Alternatives to XA transactions:
- Implement duplicate detection on the consumer side