Setting up XA transactions over multiple transactional resources

Using the recipes discussed previously in this chapter, it is possible to set up multiple transactions in one route with many transacted/policy blocks each referring to a different transaction manager, each managing a different transactional resource. When an exchange's processing is completed, the various transaction managers are instructed to commit one-by-one. If one of them fails to commit, perhaps due to an inconveniently-timed outage, that failure may leave the other backends in an inconsistent state overall, with some already having been committed, and now unable to roll back.

To get around this, you can employ a single over-arching transaction manager to coordinate multiple ...

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.