Tag

Programmatic Transaction

1 views collected around this technical thread.

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 BootTransactionTemplate
0 likes · 7 min read
Mastering Programmatic Transactions in Spring Boot 3.2.5
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.

Backend DevelopmentCompletableFutureProgrammatic Transaction
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions
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 Transactionbackend
0 likes · 9 min read
Avoiding Long Transactions in Spring: Lessons from a Production Incident
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