Declarative Transaction Management with Spring
Spring’s transaction abstraction lets you demarcate units of work so that either every participating database statement succeeds or the entire sequence is rolled back. While JDBC already offers Connection#setAutoCommit(false), Spring adds portable configuration, propagation rules, and AOP-based declarations that can be applied at the service la ...
Posted on Mon, 14 Sep 2026 16:25:50 +0000 by Orpheus13
Java Loop-Based Transaction Commit
What is Loop-Based Transaction Commit?
Loop-based transaction commit is a robust pattern for managing database transactions across repeated, similar operations. It disables automatic transaction committing, executes a sequence of database actions in a loop, validates each operation's outcome, commits only when validation passes, and rolls back ...
Posted on Fri, 11 Sep 2026 16:24:15 +0000 by blueway
Handling Empty Rollbacks and Suspended Transactions in TCC-Based Distributed Systems
Understanding Empty Rollbacks
An empty rollback occurs when the Cancel operation of a TCC (Try-Confirm-Cancel) transaction runs, but the corresponding Try phase was never successfully executed. This results in an attempt to compensate for resources that were never reserved.
Scenario Example
Consider a scenario where a coordinator dispatches a T ...
Posted on Thu, 27 Aug 2026 16:18:08 +0000 by zeus1
Configuring Database Transactions in Spring: XML and Annotation Approaches
Transaction Fundamentals
A database transaction encapsulates a sequence of operations in to a single logical execution unit. When a transaction commits, all modifications within its scope become permanent; if any step fails, the entire sequence is reverted, leaving the database in its prior consistent state.
Effective transaction processing gua ...
Posted on Fri, 21 Aug 2026 16:45:42 +0000 by receiver
Spring Boot Multi-Data Source Configuration Guide
This article explores scenarios where multiple data sources are required and demonstrates how to configure them using Spring Boot.
The configuration approach primarily references another blog post: https://blog.csdn.net/u012060033/article/details/123759694
For a concise overview, readers may refer to: https://www.cnblogs.com/chen-msg/p/7485701. ...
Posted on Sun, 19 Jul 2026 16:19:22 +0000 by iwanpattyn
Managing Transactions with Spring Framework
In database operations, a transaction is treated as a single unit of work. To ensure data integrity, transactions adhere to four key principles, often abbreviated as ACID:
Atomicity: Ensures that all operations within the transaction succeed. If any step fails, the entire transaction is aborted, and no changes are applied.
Consistency: Maintai ...
Posted on Tue, 07 Jul 2026 16:47:18 +0000 by Benny007
Java Backend Employee and Department Management: Global Exception Handling, Login Validation, AOP, and Transaction Management
Login Module
After completing all the previous modules, we continue with login validation, global exception handling, transaction management, and AOP.
A simple login checks the database for the employee. This can be implemented using a three-layer architecture.
Controller Layer
Create a LoginController class dedicated to handling login requests ...
Posted on Tue, 19 May 2026 06:56:45 +0000 by gkep