Skip to content
javabypankaj
HomeLibraryPopularCommunity
08
Transactions
10 topics · 32 questions
1@Transactional Basics0/772Declarative vs Programmatic0/223Isolation Levels & MVCC0/334Transaction Propagation0/45Rollback Rules & Pitfalls0/556Deadlocks & Locking0/227Events & Transaction Callbacks0/338Multiple DataSources0/229Distributed Transactions & Saga0/2210Transaction Internals0/22
1@Transactional Basics72Declarative vs Programmatic23Isolation Levels & MVCC34Transaction Propagation45Rollback Rules & Pitfalls56Deadlocks & Locking27Events & Transaction Callbacks38Multiple DataSources29Distributed Transactions & Saga210Transaction Internals2
10 topics32 Qs0%
01Core Java17002OOP3203Collections6704Exception Handling2805Concurrency & Multithreading12706Java Streams, Lambda & Functional Programming32807Spring & Spring Boot2608Transactions3209JPA & Hibernate6910Microservices19411Kafka & Messaging9112DevOps, CI/CD & Tooling13313Database & SQL14114REST API & Web4015Design Patterns & LLD5716Advanced Java7117Coding Problems: DSA49218AWS & Cloud4119Data Engineering19420QA, Testing & SDET4121System Design3522Security2023Behavioral / HR: STAR Method37
10Topics
32Questions
0%Complete
4 of 10 topics
Topics
1@Transactional Basics0/772Declarative vs Programmatic0/223Isolation Levels & MVCC0/33
4Transaction Propagation0/44
5Rollback Rules & Pitfalls0/556Deadlocks & Locking0/227Events & Transaction Callbacks0/338Multiple DataSources0/229Distributed Transactions & Saga0/2210Transaction Internals0/22

Transaction Propagation

Transactions·Topic 4 of 10·4 questions
Q1What are transaction propagation levels?

Propagation controls what happens when one @Transactional method calls another -- REQUIRED joins or creates, REQUIRES_NEW always starts fresh, MANDATORY insists on an existing transaction, and NESTED creates a savepoint.

Read Answer
Q2What is the REQUIRES_NEW connection pool deadlock?

REQUIRES_NEW holds two connections per thread because it suspends the outer transaction's connection and checks out a new one -- if the pool is smaller than the concurrent thread count, the pool deadlocks and the application freezes.

Read Answer
Q3What are AB-BA row-level deadlocks?

An AB-BA deadlock is a circular wait at the row level where two transactions lock the same rows in opposite order -- the fix is consistent lock ordering, enforced by application code or by Hibernate's order_inserts and order_updates settings.

Read Answer
Q4Why is REQUIRES_NEW + sync REST calls a Saga anti-pattern?

Never hold a database connection while waiting on a network call -- REQUIRES_NEW plus synchronous REST calls waste pool connections during network latency and create a distributed monolith disguised as microservices.

Read Answer
Previous · Topic 3Isolation Levels & MVCC3 questionsNext · Topic 5Rollback Rules & Pitfalls5 questions
javabypankaj© 2026 javabypankaj
PrivacyTerms
HomeSearchLibrary