Transaction
-
REQUIRES_NEW option
Starts a new transaction. If a transaction is already in progress, the existing transaction is temporarily suspended. Using this option, data processing can be separated from the transaction that is currently in progress.
-
NESTED
In a batch with a Chunk-Oriented method, there may be cases where rollback is required only for a specific item/method during processing. In this case, NESTED is the method that can be used.
If there is an existing transaction already started, it operates as a Nested Transaction of the existing transaction; if there is no existing transaction, it becomes REQUIRED (participation in an existing transaction).
Difference from REQUIRES_NEW
-
REQUIRES_NEW: In Chunk-Oriented processing, when a rollback occurs, the DB processing handled with REQUIRES_NEW is not rolled back.
-
NESTED: In Chunk-Oriented processing, when a rollback occurs, the DB processing handled with NESTED is rolled back together.