Using transactions with messaging
This recipe will show you how to set up transaction management over JMS for use within a Camel route, both for consuming and sending messages. This recipe will also detail the corner-case behaviors that you can expect from Camel when dealing with JMS transactions.
Getting ready
The Java code for this recipe is located in the org.camelcookbook.transactions.jmstransaction
package. The Spring XML files are located under src/main/resources/META-INF/spring
and prefixed with jmsTransaction
.
As discussed in the Introduction section, Camel's transaction handling relies on the Spring's PlatformTransactionManager
abstraction. Therefore, it is necessary to include the appropriate dependency in your application regardless of ...
Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.