Tagged articles
9 articles
Page 1 of 1
Architect's Guide
Architect's Guide
Apr 27, 2026 · Backend Development

How to Optimize Large Transactions in API Endpoints

The article examines why large database transactions inside API endpoints degrade performance, outlines issues such as data inconsistency, lock contention, undo‑log overhead, and DB pressure, and presents practical optimizations including removing remote RPC calls, using programmatic transactions, batch processing, splitting into smaller transactions, and asynchronous parallel execution with code examples.

Batch ProcessingProgrammatic TransactionTransactions
0 likes · 9 min read
How to Optimize Large Transactions in API Endpoints
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Jan 26, 2025 · Backend Development

Mastering Spring Transaction Management: From JDBC to @Transactional

This article explains the fundamentals of transaction handling in Spring Boot, covering both programmatic approaches with PlatformTransactionManager and TransactionTemplate and declarative management using @Transactional, while detailing common pitfalls, propagation and isolation settings, and providing concrete code examples.

Declarative TransactionJDBCProgrammatic Transaction
0 likes · 23 min read
Mastering Spring Transaction Management: From JDBC to @Transactional
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 31, 2024 · Backend Development

Mastering Programmatic Transactions in Spring Boot 3.2.5

This tutorial explains how to use Spring Boot's programmatic transaction management—including TransactionTemplate, TransactionCallback, and PlatformTransactionManager—with detailed code examples, configuration tips, and rollback handling to improve data consistency and performance.

Programmatic TransactionSpring BootTransactionalOperator
0 likes · 7 min read
Mastering Programmatic Transactions in Spring Boot 3.2.5
Java Interview Crash Guide
Java Interview Crash Guide
Jun 27, 2023 · Backend Development

How to Ensure Transaction Consistency in Multithreaded Spring Applications

This article explains how to execute two dependent tasks in parallel using CompletableFuture, why @Async and @Transactional are insufficient for multithreaded transaction consistency, and provides a programmatic solution that copies Spring transaction resources between threads to guarantee atomic commit or rollback across asynchronous operations.

CompletableFutureProgrammatic Transactionmultithreading
0 likes · 19 min read
How to Ensure Transaction Consistency in Multithreaded Spring Applications
Selected Java Interview Questions
Selected Java Interview Questions
Jun 25, 2023 · Backend Development

Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions

This article explains how to execute two dependent tasks in parallel with CompletableFuture, why the usual @Transactional annotation fails in a multi‑threaded environment, and provides a programmatic transaction solution that copies Spring's transaction resources between threads to guarantee atomic commit or rollback across all parallel operations.

CompletableFutureProgrammatic Transactionbackend-development
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions
Architect's Journey
Architect's Journey
Jan 5, 2022 · Backend Development

Why @Transactional Can Trigger Production Outages: Lessons from a Long‑Transaction Failure

The author recounts a real‑world incident where a Spring @Transactional annotation caused database connection exhaustion, deadlocks, and a production outage, explains how long‑running transactions arise from holding a single connection during costly operations, and offers practical ways to avoid them by splitting methods or using programmatic transactions.

Database DeadlockLong TransactionProgrammatic Transaction
0 likes · 10 min read
Why @Transactional Can Trigger Production Outages: Lessons from a Long‑Transaction Failure
Code Ape Tech Column
Code Ape Tech Column
Nov 26, 2021 · Backend Development

Avoiding Long Transactions in Spring: Lessons from a Production Incident

This article explains how using Spring's @Transactional annotation can unintentionally create long-running transactions, illustrated by a production incident where database connections were exhausted, and provides strategies such as method splitting, programmatic transactions, and proxy usage to avoid such pitfalls.

Long TransactionProgrammatic Transaction
0 likes · 9 min read
Avoiding Long Transactions in Spring: Lessons from a Production Incident
Su San Talks Tech
Su San Talks Tech
Nov 30, 2020 · Backend Development

How to Tame Large Transactions in Spring: 6 Proven Strategies

This article shares practical techniques for handling large transactions in Spring-based backend systems, covering why @Transactional can cause issues, how to use programmatic transactions, move queries outside transactions, avoid remote calls, limit data volume, execute non‑transactional operations, and leverage asynchronous processing.

Declarative TransactionLarge TransactionsProgrammatic Transaction
0 likes · 10 min read
How to Tame Large Transactions in Spring: 6 Proven Strategies
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 20, 2020 · Backend Development

Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations

This article compares Spring's programmatic and declarative transaction management, explains how each works with code examples, outlines the benefits and limitations of declarative transactions—including granularity and failure scenarios—and argues why developers should consider programmatic transactions for clearer control and fewer hidden bugs.

Declarative TransactionProgrammatic Transactionaop
0 likes · 8 min read
Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations