Skip to content
javabypankaj
HomeLibraryPopularCommunity
08
Transactions
10 topics · 32 questions
1@Transactional Basics0/772Declarative vs Programmatic0/223Isolation Levels & MVCC0/334Transaction Propagation0/445Rollback Rules & Pitfalls0/556Deadlocks & Locking0/227Events & Transaction Callbacks0/338Multiple DataSources0/229Distributed Transactions & Saga0/210Transaction 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
9 of 10 topics
Topics
1@Transactional Basics0/772Declarative vs Programmatic0/223Isolation Levels & MVCC0/334Transaction Propagation0/445Rollback Rules & Pitfalls0/556Deadlocks & Locking0/227Events & Transaction Callbacks0/338Multiple DataSources0/22
9Distributed Transactions & Saga0/22
10Transaction Internals0/22

Distributed Transactions & Saga

Transactions·Topic 9 of 10·2 questions
Q1What are distributed transactions and why is Saga preferred?

Two-phase commit gives strict atomicity across resources but holds locks across the network and needs a coordinator, so microservices prefer Saga plus Outbox with eventual consistency.

Read Answer
Q2How do distributed transactions and @Modifying interact?

JTA/XA coordinates multiple resources atomically using two-phase commit (heavy and blocking), while @Modifying marks a Spring Data @Query as a DML statement that must run inside @Transactional and needs clearAutomatically to avoid stale entities.

Read Answer
Previous · Topic 8Multiple DataSources2 questionsNext · Topic 10Transaction Internals2 questions
javabypankaj© 2026 javabypankaj
PrivacyTerms
HomeSearchLibrary