Tech
Transaction propagation (REQUIRED / REQUIRES_NEW / NESTED ...) (Part 2 of 2)
Picking up between "join" and "start fresh"
Part 1 left you with two propagation modes and a clean way to think about them. REQUIRED joins whatever transaction is already running, so everything shares one all-or-nothing boundary. REQUIRES_NEW ignores the outer transaction, suspends it, and runs a completely separate one that commits or fails on its own.
Those two are opposites. Join everything, or share nothing. But real code sometimes wants something in between: let the inner work f...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to