Reactive transactions
A transaction is a marker for a database that defines the boundaries of a single unit with many logical operations that should be performed atomically. So, we have a point in time when a transaction is initialized, then some operations are happening with regard to the transaction object, then a decision moment happens. At that moment, the client and the database decide whether a transaction should be successfully committed or rolled back.
In the synchronous world, a transaction object is often held in the ThreadLocal container. However, ThreadLocal isn't suitable for associating data with a reactive flow as the user has no control over thread switching. A transaction requires binding of the underlying resource to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access