Transaction Propagation Levels and Isolation Levels
Learn Transaction Propagation Levels and Isolation Levels (Phase 15 · Spring Transactions (Essential), Spring Core) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Propagation: what happens when a transactional method calls another • REQUIRED : inner and outer share one physical transaction: if the inner method throws and marks it rollback-only, the outer cannot commit ( UnexpectedRollbackException , "Transaction silently rolled back because it has been marked as rollback-only"). REQUIRES_NEW : independent commit/rollback: use for audit logging that must persist even when the main transaction fails.