© Peter Späth 2019
P. SpäthBeginning Jakarta EEhttps://doi.org/10.1007/978-1-4842-5079-2_10

10. Maintaining State Consistency with JTA Transactions

Peter Späth1 
(1)
Leipzig, Sachsen, Germany
 

Transactions are about units of work, which either succeed in total or produce no result at all. This sounds easy at first, but consider cases where databases are involved, or queues and topics inside an associated messaging provider. Needless to say, in cases where we consider a transaction to have failed, rolling back database changes and messages in a topic or queue can become a complex matter if many tables and queues or topics are involved. The story becomes even more complex if the parties involved run on different network nodes, in which case we are talking ...

Get Beginning Jakarta EE: Enterprise Edition for Java: From Novice to Professional 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.