December 2013
Intermediate to advanced
424 pages
9h 7m
English
The technique shown in the Using transactions with a database recipe used the transacted DSL statement to initiate a transaction. Using this approach, the transaction is committed when the exchange's processing completes. This recipe will show you how you can control the scope of transactions in a much more granular fashion using the policy statement.
The Java code for this recipe is located in the org.camelcookbook.transactions.transactionpolicies package. The Spring XML files are located under src/main/resources/META-INF/spring and prefixed with transactionPolicies.
Set up a SpringTransactionPolicy associated with a transaction manager as shown in the Using transactions with a database ...
Read now
Unlock full access