Tagged articles
programmatic transaction
11 articles · Page 1 of 1
This article analyzes three critical @Transactional pitfalls in Spring Boot 3.5.0: deadlocks from inconsistent lock ordering during concurrent transfers, long transactions holding row locks during external RPC calls causing blocking and inconsistency, and nested transaction propagation causing unexpected rollbacks despite try-catch. Solutions include consistent lock ordering, transaction splitting, and using REQUIRES_NEW or programmatic transactions.
@TransactionalConcurrencyREQUIRES_NEW
0 likes · 11 min read

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.
Asynchronous ProcessingTransactionsbackend development
0 likes · 9 min read

The article compares SpringBoot's declarative transaction management using @Transactional with programmatic transaction handling via TransactionTemplate, explaining their underlying mechanisms, code examples, advantages, disadvantages, and suitable scenarios, and provides a detailed side‑by‑side table to help developers choose the appropriate approach.
AOPDeclarative TransactionSpringBoot
0 likes · 15 min read

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 TransactionJDBCSpring
0 likes · 23 min read

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.
TransactionTemplateTransactionalOperatorprogrammatic transaction
0 likes · 7 min read

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.
CompletableFutureMultithreadingprogrammatic transaction
0 likes · 19 min read

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.
CompletableFutureMultithreadingSpring
0 likes · 19 min read

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.
@TransactionalDatabase DeadlockJava
0 likes · 10 min read

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

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 TransactionsSpring
0 likes · 10 min read

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.
AOPBest PracticesDeclarative Transaction
0 likes · 8 min read
