Tagged articles

Transaction Management

157 articles · Page 2 of 2
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 1, 2021 · Backend Development

Master Programmatic Transactions in Spring Boot 2.3.9 with Templates & Managers

This guide explains how to use Spring Boot's programmatic transaction APIs—including TransactionTemplate, TransactionManager, and transactional event listeners—through detailed code examples, configuration tips, rollback handling, and best‑practice recommendations for backend Java development.

Backend DevelopmentJavaProgrammatic Transactions
0 likes · 9 min read
Master Programmatic Transactions in Spring Boot 2.3.9 with Templates & Managers
Architect
Architect
Nov 29, 2021 · Backend Development

Common Scenarios Where Spring Transactions Fail and How to Fix Them

This article explains why Spring's @Transactional annotation can silently fail in many typical situations—such as incorrect method visibility, final methods, self‑invocation, unmanaged beans, multithreading, non‑transactional tables, missing configuration, wrong propagation or rollback settings, nested transaction behavior, and oversized transaction scopes—and provides practical solutions to ensure reliable transaction management.

AOPSpringTransaction Management
0 likes · 16 min read
Common Scenarios Where Spring Transactions Fail and How to Fix Them
Code Ape Tech Column
Code Ape Tech Column
Nov 13, 2021 · Backend Development

Spring Framework Interview Questions and Answers Overview

This article compiles a comprehensive set of Spring interview questions covering design patterns, core modules, IoC, DI, AOP, proxy mechanisms, bean lifecycle, circular dependency resolution, transaction isolation and propagation, as well as Spring Boot auto‑configuration principles, providing concise explanations for each topic.

AOPDependency InjectionIOC
0 likes · 16 min read
Spring Framework Interview Questions and Answers Overview
Wukong Talks Architecture
Wukong Talks Architecture
Oct 17, 2021 · Backend Development

Common Scenarios Where Spring Transactions Fail and How to Fix Them

This article explains why Spring @Transactional may become ineffective in various situations—such as wrong method visibility, final or static modifiers, internal method calls, missing bean registration, multithreading, unsupported table engines, misconfigured propagation, swallowed exceptions, and improper rollback settings—and provides practical solutions for each case.

@TransactionalTransactionTransaction Management
0 likes · 19 min read
Common Scenarios Where Spring Transactions Fail and How to Fix Them
Top Architect
Top Architect
Jul 21, 2021 · Backend Development

Understanding Spring's @Transactional Annotation: Implementation and AOP Mechanics

This article explains the purpose and inner workings of Spring's @Transactional annotation, detailing how AOP and dynamic proxies create transactional proxies, the role of BeanPostProcessor, advisors, TransactionInterceptor, and the transaction lifecycle, accompanied by code examples and diagrams for deeper insight.

@TransactionalAOPBackend Development
0 likes · 10 min read
Understanding Spring's @Transactional Annotation: Implementation and AOP Mechanics
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 10, 2021 · Backend Development

Mastering Programmatic Transaction Management in Spring Boot 2.3.9

This guide explains Spring Boot's two programmatic transaction approaches—TransactionTemplate/TransactionalOperator and direct TransactionManager—provides detailed code examples for using TransactionTemplate with return values, rollbacks, property configuration, demonstrates PlatformTransactionManager usage, and shows how to listen to transaction events with @TransactionalEventListener.

Backend DevelopmentJavaProgrammatic Transactions
0 likes · 8 min read
Mastering Programmatic Transaction Management in Spring Boot 2.3.9
Programmer DD
Programmer DD
Jul 9, 2021 · Backend Development

Why Catching an Exception Doesn't Prevent Spring Transaction Rollback

This article explains why a caught javax.validation.ConstraintViolationException in a Spring @Transactional method does not stop the transaction from rolling back, and shows how to debug the flow with logs and breakpoints to understand the underlying commit process.

JavaSpringTransaction Management
0 likes · 4 min read
Why Catching an Exception Doesn't Prevent Spring Transaction Rollback
Java Interview Crash Guide
Java Interview Crash Guide
Jun 1, 2021 · Backend Development

How Does Spring’s @Transactional Work? A Deep Dive into AOP and Transaction Management

This article explains the purpose and inner workings of Spring’s @Transactional annotation, detailing how AOP creates proxies, defines pointcuts, and orchestrates transaction management through BeanPostProcessors, advisors, interceptors, and the TransactionInterceptor, illustrated with source code snippets and diagrams.

AOPAnnotationBackend Development
0 likes · 10 min read
How Does Spring’s @Transactional Work? A Deep Dive into AOP and Transaction Management
Selected Java Interview Questions
Selected Java Interview Questions
May 31, 2021 · Backend Development

Understanding Spring's @Transactional Annotation: AOP‑Based Implementation and Transaction Management Flow

This article explains the purpose of Spring's @Transactional annotation, how it leverages AOP and dynamic proxies to manage transactions, and walks through the core source‑code components—including BeanPostProcessor, advisors, TransactionInterceptor, and the transaction lifecycle—illustrated with concrete code examples.

@TransactionalAOPDynamic Proxy
0 likes · 9 min read
Understanding Spring's @Transactional Annotation: AOP‑Based Implementation and Transaction Management Flow
Top Architect
Top Architect
May 18, 2021 · Databases

Understanding Database Connection Pools and ThreadLocal in Java for Transaction Management

This article explains the fundamental differences between database connection pools and ThreadLocal, how each is used in Java to improve performance and enable cross‑method transaction control, and provides practical code examples and best‑practice guidelines for managing connections in multi‑threaded applications.

Backend DevelopmentJavaThreadLocal
0 likes · 7 min read
Understanding Database Connection Pools and ThreadLocal in Java for Transaction Management
Java Backend Technology
Java Backend Technology
May 16, 2021 · Backend Development

Why ThreadLocal and Connection Pools Differ: Master Transaction Management in Java

This article explains the fundamental differences between database connection pools and ThreadLocal in Java, showing how pools improve performance while ThreadLocal enables sharing a single connection across a thread for seamless transaction control, and clarifies common misconceptions with code examples and practical insights.

Connection PoolJavaThreadLocal
0 likes · 6 min read
Why ThreadLocal and Connection Pools Differ: Master Transaction Management in Java
Top Architect
Top Architect
Apr 20, 2021 · Backend Development

Why @Transactional May Not Work: Common Failure Scenarios and Source‑Code Analysis

This article explains three typical situations in which Spring's @Transactional annotation becomes ineffective—non‑public methods, internal self‑calls, and caught exceptions—illustrates each case with runnable code examples, and dives into the underlying AOP and transaction‑management source code to show why the proxy logic is bypassed.

@TransactionalAOPJava
0 likes · 12 min read
Why @Transactional May Not Work: Common Failure Scenarios and Source‑Code Analysis
Intelligent Backend & Architecture
Intelligent Backend & Architecture
Apr 12, 2021 · Backend Development

Mastering Spring MVC: Core Concepts, Components, and Annotations Explained

This comprehensive guide explains Spring MVC's MVC architecture, key components like DispatcherServlet and HandlerMapping, request processing flow, transaction management options, and essential annotations such as @Controller, @RequestMapping, @Autowired, and @Transactional, providing Java web developers with a clear, practical overview.

Dependency InjectionJavaTransaction Management
0 likes · 38 min read
Mastering Spring MVC: Core Concepts, Components, and Annotations Explained
Top Architect
Top Architect
Jan 14, 2021 · Backend Development

Understanding Spring Transaction Management: Mechanisms, Common Pitfalls, and Best Practices

This article explains how Spring transaction management works, details its declarative and programmatic integration methods, examines core implementation classes and AOP proxies, and highlights frequent pitfalls such as ineffective transactions, rollback failures, and timeout issues, providing code examples and solutions for Java backend developers.

AOPJavaSpring
0 likes · 21 min read
Understanding Spring Transaction Management: Mechanisms, Common Pitfalls, and Best Practices
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
Architecture Digest
Architecture Digest
Nov 3, 2020 · Backend Development

Data Consistency in Microservices: Transaction Management and Implementation Patterns

This article introduces the limitations of traditional local and distributed transactions for microservices, explains the BASE theory, and details four practical patterns—reliable event notification, maximum‑effort notification, business compensation, and TCC—providing code examples, diagrams, and a comparative table to guide developers in achieving eventual consistency across microservice architectures.

BASE theoryData ConsistencyTCC
0 likes · 19 min read
Data Consistency in Microservices: Transaction Management and Implementation Patterns
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.

AOPDeclarative TransactionJava
0 likes · 8 min read
Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations
Java Architect Essentials
Java Architect Essentials
Oct 13, 2020 · Backend Development

Data Consistency in Microservices: Transaction Management Patterns and Practices

The article reviews microservice data consistency challenges, explains why traditional distributed transactions like 2PC/3PC are unsuitable, introduces the BASE theory, and details four implementation patterns—reliable event notification, maximum effort notification, business compensation, and TCC—to achieve eventual consistency.

BASE theoryData ConsistencyMicroservices
0 likes · 19 min read
Data Consistency in Microservices: Transaction Management Patterns and Practices
Java Architect Essentials
Java Architect Essentials
Sep 1, 2020 · Backend Development

How to Ensure Data Consistency in Microservices: Patterns and Pitfalls

Microservice architectures struggle with traditional ACID transactions, so this article reviews local and distributed transaction basics, explains why 2PC/3PC are unsuitable, introduces the BASE model, and details four practical consistency patterns—reliable event, async event, business compensation, and TCC—highlighting their mechanisms, advantages, and drawbacks.

BASE theoryData ConsistencyEvent-Driven Architecture
0 likes · 17 min read
How to Ensure Data Consistency in Microservices: Patterns and Pitfalls
Programmer DD
Programmer DD
Jul 10, 2020 · Backend Development

Mastering Spring Boot Transactions: From Basics to Advanced Settings

This article explains what database transactions are, demonstrates how to use Spring Boot’s @Transactional annotation with unit tests, and dives into transaction isolation levels and propagation behaviors, providing code examples and guidance for effective transaction management in Java backend applications.

JavaSpring BootTransaction Management
0 likes · 13 min read
Mastering Spring Boot Transactions: From Basics to Advanced Settings
Architecture Digest
Architecture Digest
Apr 25, 2020 · Backend Development

Data Consistency Strategies in Microservices: Transaction Management Patterns

This article introduces the limitations of traditional local and distributed transactions for microservices, explains the BASE theory, and details four major patterns—reliable event notification, max‑effort notification, business compensation, and TCC—to achieve eventual consistency in microservice architectures.

Data ConsistencyMicroservicesTransaction Management
0 likes · 16 min read
Data Consistency Strategies in Microservices: Transaction Management Patterns
macrozheng
macrozheng
Mar 27, 2020 · Backend Development

Why @Transactional Fails: 6 Common Pitfalls and How to Fix Them

This article explains the purpose of Spring's @Transactional annotation, details its configurable attributes, and enumerates six typical scenarios—such as non‑public methods, wrong propagation settings, self‑invocation, and unsupported database engines—that cause the annotation to become ineffective, providing code examples and solutions.

@TransactionalAOPJava
0 likes · 12 min read
Why @Transactional Fails: 6 Common Pitfalls and How to Fix Them
Yanxuan Tech Team
Yanxuan Tech Team
Mar 23, 2020 · Databases

How to Boost E‑commerce Inventory Performance Without Sacrificing Consistency

This article explains how the inventory service at a large e‑commerce platform was optimized for high‑traffic sales events by redesigning transaction handling, sharding data by SKU, and combining flexible and rigid transactions to improve throughput while preserving data consistency.

InventoryTransaction Managementdistributed database
0 likes · 10 min read
How to Boost E‑commerce Inventory Performance Without Sacrificing Consistency
Qunar Tech Salon
Qunar Tech Salon
Feb 14, 2020 · Databases

Understanding InnoDB Rollback and UNDO Log Architecture in MySQL

This article explains the internal structure of InnoDB rollback segments, UNDO log storage formats, and the recovery process in MySQL, detailing how transaction IDs, segment headers, page headers, and log records are organized and used to safely roll back or purge data.

Database InternalsInnoDBRollback
0 likes · 22 min read
Understanding InnoDB Rollback and UNDO Log Architecture in MySQL
dbaplus Community
dbaplus Community
Nov 17, 2019 · Databases

How Hybrid Logical Clocks Power Distributed Transactions

This article explains why distributed databases need precise clocks, compares central, logical, and hybrid clock designs, and shows how hybrid logical clocks (HLC) together with two‑phase commit and other transaction techniques enable consistent, high‑throughput distributed transactions.

DatabasesTransaction Managementclocks
0 likes · 18 min read
How Hybrid Logical Clocks Power Distributed Transactions
Java Backend Technology
Java Backend Technology
Sep 9, 2019 · Backend Development

Mastering TCC Distributed Transactions: Key Design Principles and Pitfalls

This article explores the complexities of building a generic TCC distributed transaction framework, emphasizing the need for RM-local transaction integration, Spring TransactionManager takeover, fault‑recovery mechanisms, idempotency guarantees, and proper handling of Try/Confirm/Cancel phases to ensure global consistency.

SpringTCCTransaction Management
0 likes · 18 min read
Mastering TCC Distributed Transactions: Key Design Principles and Pitfalls
Mafengwo Technology
Mafengwo Technology
Apr 11, 2019 · Backend Development

Boosting Ticket Order Systems with State Machines: Design & Lessons

This article explores how applying finite state machines to a ticket order transaction system improves stability, scalability, and maintainability, detailing the system’s architecture, database design, framework selection, custom MSM implementation, and practical challenges such as transaction handling, action matching, asynchronous messaging, and concurrency control.

State MachineTransaction Managementasynchronous messaging
0 likes · 12 min read
Boosting Ticket Order Systems with State Machines: Design & Lessons
Java Captain
Java Captain
Apr 6, 2019 · Backend Development

Understanding Spring Transaction Management and AOP Mechanism

This article explains how Spring enables transaction management through @EnableTransactionManagement, details the internal configuration selectors, bean registrations, AOP pointcuts, and the TransactionInterceptor implementation, illustrating the flow of transaction attribute detection, method interception, and exception‑based commit or rollback.

AOPBackend DevelopmentDeclarative Transactions
0 likes · 9 min read
Understanding Spring Transaction Management and AOP Mechanism
Tencent Cloud Developer
Tencent Cloud Developer
Mar 7, 2019 · Databases

How to Address High CPU Load on a Single MySQL Core

To resolve a MySQL single‑core CPU bottleneck, examine and tune slow queries and indexes, eliminate heavy lock contention, break large transactions into smaller ones, and employ tools like perf top to pinpoint performance hotspots, as recommended by Tencent Cloud Database expert Liu Di.

CPU optimizationDatabase PerformancePerf tool
0 likes · 3 min read
How to Address High CPU Load on a Single MySQL Core
JD Tech
JD Tech
Feb 22, 2019 · Databases

Issues When Using Transactions with Database Read/Write Splitting

This article examines the challenges of using transactions with database read/write splitting, including potential master‑slave switching errors, connection‑pool deadlocks caused by isolation levels and propagation, and presents Spring‑based dynamic data source and transaction management solutions.

Dynamic Data SourceRead‑Write SplittingSpring
0 likes · 6 min read
Issues When Using Transactions with Database Read/Write Splitting
Youzan Coder
Youzan Coder
Jan 25, 2019 · Databases

MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention

The guide explains MySQL/InnoDB deadlocks—how circular lock waits arise, the wait‑for‑graph detection that rolls back the transaction with fewer undo logs, the various lock modes and their behavior in UPDATE/INSERT/DELETE, and practical strategies such as proper indexing, consistent access order, and configuration tweaks to detect, handle, and prevent deadlocks.

Concurrency ControlDatabase LocksDeadlock
0 likes · 13 min read
MySQL/InnoDB Deadlock Analysis: Detection, Handling, and Prevention
Programmer DD
Programmer DD
Dec 25, 2018 · Backend Development

Mastering TCC Distributed Transactions: A Practical Guide to TRY, CONFIRM, and CANCEL

This article introduces the TCC (Try‑Confirm‑Cancel) distributed transaction model, explains its three phases with real‑world e‑commerce examples, compares it to other solutions, and shows how mature frameworks ensure eventual consistency and automatic rollback in failure scenarios.

TCCTransaction Managementdistributed transaction
0 likes · 8 min read
Mastering TCC Distributed Transactions: A Practical Guide to TRY, CONFIRM, and CANCEL
Java Captain
Java Captain
Dec 12, 2018 · Backend Development

Design and Implementation of the Service Layer for a High‑Concurrency Seckill Application Using Java Spring

This article explains the purpose of the Service layer in a Java SSM‑based high‑concurrency seckill project, walks through interface design, DTO/VO/PO concepts, provides full Service implementation with transaction management, custom exceptions, enumeration for status codes, Spring XML configuration, and unit testing examples.

Backend DevelopmentJavaSeckill
0 likes · 15 min read
Design and Implementation of the Service Layer for a High‑Concurrency Seckill Application Using Java Spring
JD Retail Technology
JD Retail Technology
Jul 20, 2018 · Databases

Vitess Two-Phase Commit Implementation and Distributed Transaction Management

This article explains the fundamentals of database transactions, introduces Vitess's architecture, and details how Vitess implements a two‑phase commit protocol for distributed transactions, including transaction IDs, metadata management, preparation, commit, rollback, error handling, and performance considerations, with illustrative Go code snippets.

GoTransaction ManagementVitess
0 likes · 25 min read
Vitess Two-Phase Commit Implementation and Distributed Transaction Management
Java Backend Technology
Java Backend Technology
Jul 15, 2018 · Backend Development

Mastering TCC: Key Design Practices for Reliable Distributed Transactions

This article introduces the TCC (Try‑Confirm‑Cancel) distributed transaction model, explains its two‑phase workflow, and outlines six essential design considerations—including two‑phase operation splitting, empty rollback handling, suspension control, idempotency, data visibility, and concurrency—while sharing Ant Financial’s decade‑long practical experience and solutions.

TCCTransaction Managementdistributed transactions
0 likes · 6 min read
Mastering TCC: Key Design Practices for Reliable Distributed Transactions
ITPUB
ITPUB
Jul 3, 2018 · Databases

How T‑TDSQL Implements Dual‑Temporal Data Management in Distributed Environments

This article details the architecture and implementation techniques of T‑TDSQL’s dual‑temporal database system, covering full‑state data reading, history‑table creation, snapshot query syntax, transaction snapshot attributes, visibility algorithms, transaction‑state management, index design, and valid‑time creation, query, update, and delete operations.

MVCCSQLTDSQL
0 likes · 17 min read
How T‑TDSQL Implements Dual‑Temporal Data Management in Distributed Environments
Architecture Digest
Architecture Digest
May 20, 2018 · Backend Development

Understanding Distributed Transactions and the XA Two‑Phase Commit Protocol

The article explains how distributed transactions work in microservice architectures, using inventory‑order examples and a World of Warcraft raid analogy to illustrate the XA two‑phase commit protocol, its normal and failure flows, limitations, and alternative approaches such as three‑phase commit, message‑queue and TCC transactions.

MicroservicesTransaction ManagementXA protocol
0 likes · 7 min read
Understanding Distributed Transactions and the XA Two‑Phase Commit Protocol
dbaplus Community
dbaplus Community
May 6, 2018 · Databases

NewSQL Explained: Storage Engines, Sharding, and Distributed Transactions

This article examines the core technologies behind NewSQL databases for OLTP workloads, contrasting them with NoSQL and traditional relational systems by exploring storage engines such as B‑Tree and LSM‑Tree, sharding strategies, replication models, and distributed transaction mechanisms like two‑phase commit.

NewSQLShardingStorage Engines
0 likes · 20 min read
NewSQL Explained: Storage Engines, Sharding, and Distributed Transactions
Ctrip Technology
Ctrip Technology
Feb 16, 2017 · Backend Development

Designing a Payment Routing Mechanism: From Business Scenarios to Technical Implementation

The article explains how a payment routing system can be built to manage profitability, user experience, and success rates by combining guide routing and transaction routing, using real‑world analogies, strategy examples, and architectural diagrams to illustrate channel selection, risk control, and cost optimization.

FinTechTransaction Managementbackend
0 likes · 10 min read
Designing a Payment Routing Mechanism: From Business Scenarios to Technical Implementation
Qunar Tech Salon
Qunar Tech Salon
Jun 2, 2016 · Backend Development

Understanding Spring Declarative Transaction Propagation and Isolation Levels

This article explains Spring's declarative transaction mechanism, detailing transaction attributes such as propagation behavior, isolation levels, timeout and read‑only flags, and illustrates each propagation type with Java code examples to show how transactions are started, joined, suspended, or nested.

SpringTransaction Managementbackend
0 likes · 11 min read
Understanding Spring Declarative Transaction Propagation and Isolation Levels
Architecture Digest
Architecture Digest
May 17, 2016 · Backend Development

69 Spring Interview Questions and Answers

This article provides a comprehensive collection of 69 Spring interview questions and answers, covering core concepts such as the framework overview, benefits, modules, IoC container, bean scopes, dependency injection, AOP, annotations, JDBC template, DAO support, transaction management, and MVC architecture.

AOPDependency InjectionJava
0 likes · 19 min read
69 Spring Interview Questions and Answers
High Availability Architecture
High Availability Architecture
Apr 19, 2016 · Databases

Distributed Transaction Consistency Solutions for E‑commerce Systems

This article explains the challenges of maintaining data consistency across multiple services in distributed e‑commerce architectures and presents six practical solutions—including business integration, the eBay BASE pattern, Qunar's approach, Mogujie's design, Alipay's DTS, and Nongxin's scheme—highlighting their advantages, drawbacks, and implementation details.

BASECAP theoremData Consistency
0 likes · 16 min read
Distributed Transaction Consistency Solutions for E‑commerce Systems