Tagged articles

transaction management

171 articles · Page 1 of 2
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 21, 2026 · Backend Development

Why Your API Slows Down: 8 Critical Bottlenecks in Spring Boot Performance

This article analyzes eight common API performance bottlenecks in Spring Boot applications, including N+1 queries, improper entity returns, missing indexes, JOIN FETCH pagination issues, in-memory filtering, deep pagination, long transactions, and caching strategies, with code examples and optimization techniques for each.

API performanceCachingDTO projection
0 likes · 14 min read
Why Your API Slows Down: 8 Critical Bottlenecks in Spring Boot Performance
LuTiao Programming
LuTiao Programming
Sep 20, 2026 · Backend Development

How to Guarantee Single Order Processing When Payment Callbacks Fire 10 Times

The article explains how to handle duplicate payment callbacks in Spring Boot using database unique constraints, conditional state updates, an outbox pattern for reliable event publishing, and downstream idempotency, ensuring orders are processed exactly once even if the payment platform sends repeated notifications.

Database ConstraintsOutbox PatternSpring Boot
0 likes · 17 min read
How to Guarantee Single Order Processing When Payment Callbacks Fire 10 Times
LuTiao Programming
LuTiao Programming
Sep 11, 2026 · Backend Development

API Latency Spike to 8s: Not Slow SQL, But Long Transactions Holding DB Connections

An API's sudden latency spike from 200ms to 8 seconds was traced not to slow SQL but to database connection pool exhaustion caused by @Transactional methods holding connections during external HTTP calls to a payment service; splitting transactions and moving external calls outside the transaction boundary resolved the issue.

Database Connection PoolHikariCPPerformance Troubleshooting
0 likes · 15 min read
API Latency Spike to 8s: Not Slow SQL, But Long Transactions Holding DB Connections
Programmer1970
Programmer1970
Sep 7, 2026 · Backend Development

12 Spring Transaction Failure Scenarios: Why 90% of Developers Fall for #8

This article systematically breaks down 12 common scenarios where Spring @Transactional fails, from non-public methods and self-invocation to exception swallowing, wrong propagation, controller-layer annotations, long transactions, and misconfigured transaction managers. Each scenario includes code examples, root-cause analysis, and practical fixes.

@TransactionalAOPBest Practices
0 likes · 14 min read
12 Spring Transaction Failure Scenarios: Why 90% of Developers Fall for #8
Cambridge Mofang Notes
Cambridge Mofang Notes
Sep 7, 2026 · Backend Development

Points System Architecture: Concurrency, Batch Expiration & Idempotent Reconciliation

This article walks through designing a points system architecture, starting from a concrete scenario of consuming 80 points across two batches with retries and refunds, covering data models, idempotency keys, local transactions, cache-aside, event-driven reconciliation, scaling strategies, and evolutionary deployment phases.

batch expirationcache-asideevent-driven
0 likes · 27 min read
Points System Architecture: Concurrency, Batch Expiration & Idempotent Reconciliation
LuTiao Programming
LuTiao Programming
Aug 26, 2026 · Backend Development

Why a 5 ms SQL Query Holds a DB Connection for 500 ms – The Hidden Transaction Issue

The article explains how a fast SQL statement can occupy a database connection for hundreds of milliseconds because Spring’s @Transactional starts the transaction and acquires the connection long before the first JDBC statement, and shows how the new Spring Boot 4.1 `connection‑fetch: lazy` setting postpones the acquisition to solve the problem.

HikariCPLazyConnectionDataSourceProxyPerformance
0 likes · 12 min read
Why a 5 ms SQL Query Holds a DB Connection for 500 ms – The Hidden Transaction Issue
liandk
liandk
Aug 22, 2026 · Databases

Mastering Database Transactions: Eliminate Data Chaos and Loss with ACID Basics

The article explains how database transactions ensure atomicity, consistency, isolation, and durability, showing why they are essential for preventing data inconsistency, loss, and reconciliation errors, and provides step‑by‑step SQL examples of successful and rolled‑back transactions along with practical tips for safe usage.

ACIDData ConsistencyDatabase Transactions
0 likes · 6 min read
Mastering Database Transactions: Eliminate Data Chaos and Loss with ACID Basics
Coder Trainee
Coder Trainee
Jul 14, 2026 · Backend Development

Top 10 Must‑Know Spring Interview Questions for Java Developers

This article walks through the ten most frequently asked Spring interview topics—including IoC/DI concepts, bean lifecycle, AOP mechanics, circular‑dependency resolution, @Transactional behavior, Spring Boot startup steps, auto‑configuration, @Autowired vs @Resource, bean scopes, and the differences between servlet filters and Spring interceptors—providing concrete code examples and key points that can earn interviewers' extra credit.

AOPBean ScopeDependency Injection
0 likes · 12 min read
Top 10 Must‑Know Spring Interview Questions for Java Developers
Linyb Geek Road
Linyb Geek Road
Jun 25, 2026 · Backend Development

8 Hard‑Earned Rules for Using Spring @Transactional Correctly

Drawing on a decade of production experience, the article presents eight concrete rules for Spring @Transactional—covering transaction duration, proxy limitations, rollback settings, exception handling, read‑only flags, method visibility, bean separation for retries, and logging—to prevent common bugs and ensure reliable database operations.

@TransactionalBest PracticesJava
0 likes · 12 min read
8 Hard‑Earned Rules for Using Spring @Transactional Correctly
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 13, 2026 · Backend Development

10 Fatal @Transactional Mistakes in Spring Boot (The Last One Is Critical)

This article examines ten common pitfalls when using Spring Boot's @Transactional annotation, explains why each issue occurs—from self‑invocation and private methods to swallowed exceptions, read‑only settings, long transactions, lock interactions, and deadlocks—and provides concrete code examples and three‑step solutions to avoid them.

@TransactionalJavaSpring Boot
0 likes · 16 min read
10 Fatal @Transactional Mistakes in Spring Boot (The Last One Is Critical)
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Jun 12, 2026 · Databases

PostgreSQL Migration Pitfalls: From Rough Practices to Stable Management

The article analyzes common mistakes when moving from MySQL to PostgreSQL—such as oversized connection pools, blind max_connections tweaks, oversized transactions, idle‑in‑transaction connections, and indiscriminate indexing—and offers concrete, step‑by‑step guidance to achieve a stable, well‑tuned PostgreSQL deployment.

Index OptimizationPostgreSQLconnection pool
0 likes · 14 min read
PostgreSQL Migration Pitfalls: From Rough Practices to Stable Management
Coder Trainee
Coder Trainee
May 10, 2026 · Backend Development

Spring Boot Source Code Deep Dive (Part 7): Full Recap and Ultimate Interview Guide

The final installment of the Spring Boot source‑code series consolidates the previous six episodes—covering startup flow, auto‑configuration, IoC container, bean lifecycle, circular dependencies, and SPI—while providing a complete knowledge map, 20 interview‑question templates, practical study tips, and a roadmap for further learning and contribution.

Auto-configurationBean LifecycleConfiguration
0 likes · 14 min read
Spring Boot Source Code Deep Dive (Part 7): Full Recap and Ultimate Interview Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 30, 2026 · Backend Development

5 Common Spring Boot Anti‑Patterns You Must Avoid

The article examines five high‑frequency Spring Boot anti‑patterns—field injection, returning entities from controllers, overusing @Transactional, generic exception handling, and embedding business logic in controllers—showing problematic code snippets, real‑world consequences, and concise refactored examples to improve testability, performance, and maintainability.

Anti-PatternController DesignDependency Injection
0 likes · 9 min read
5 Common Spring Boot Anti‑Patterns You Must Avoid
Java Tech Workshop
Java Tech Workshop
Apr 18, 2026 · Backend Development

SpringBoot: Declarative @Transactional vs Programmatic TransactionTemplate

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 TransactionProgrammatic Transaction
0 likes · 15 min read
SpringBoot: Declarative @Transactional vs Programmatic TransactionTemplate
Java Tech Workshop
Java Tech Workshop
Apr 18, 2026 · Backend Development

Deep Dive into SpringBoot @Transactional: How It Works and Common Pitfalls

This article explains the fundamentals of transaction management in SpringBoot, detailing the ACID properties, the @Transactional annotation’s AOP‑based implementation, core attributes such as propagation, isolation, rollback rules, timeout and read‑only mode, and provides practical code examples for single‑ and multi‑datasource scenarios.

@TransactionalJavaSpring
0 likes · 20 min read
Deep Dive into SpringBoot @Transactional: How It Works and Common Pitfalls
SpringMeng
SpringMeng
Apr 11, 2026 · Backend Development

How a New Tech Lead Crafted an Elegant Payment System Architecture

The article breaks down the complexities of payment processing by outlining business background, decomposing the workflow into modular steps, illustrating sequence diagrams, designing data structures, and addressing related domains such as product and coupon management, while highlighting key technical challenges like TCC transactions, locking, and retry mechanisms.

TCCbackend architecturecoupon rules
0 likes · 8 min read
How a New Tech Lead Crafted an Elegant Payment System Architecture
Coder Trainee
Coder Trainee
Apr 7, 2026 · Backend Development

Setting Up Seata (pre‑1.0) for Distributed Transactions in Microservices

This guide explains what a distributed transaction is and walks through the complete setup of a Seata server (version 0.9.0), including downloading, configuring file.conf and registry.conf for Nacos, initializing the database, starting services, and creating the required undo_log table.

NacosSQLSeata
0 likes · 4 min read
Setting Up Seata (pre‑1.0) for Distributed Transactions in Microservices
Top Architect
Top Architect
Apr 3, 2026 · Backend Development

Why Did My Payment Service Lose Data? Uncovering Hidden Transaction Bugs in Spring

A mysterious payment failure where orders appeared successful but were never persisted was traced to a missing transaction commit in a special code path, leading to polluted connections that silently broke subsequent transactions, and the article explains the root cause, debugging steps, fix, and preventive measures.

MySQLSpringconnection pool
0 likes · 11 min read
Why Did My Payment Service Lose Data? Uncovering Hidden Transaction Bugs in Spring
Java Tech Workshop
Java Tech Workshop
Apr 2, 2026 · Backend Development

SpringBoot Multiple Data Source Configuration for Basic Read‑Write Separation

This guide explains how to configure multiple data sources in SpringBoot to achieve basic read‑write separation, covering applicable scenarios, step‑by‑step setup of master and slave DataSources, SqlSessionFactory and SqlSessionTemplate beans, package‑based routing, transaction considerations, common pitfalls, and best‑practice recommendations.

JavaMultiple DataSourceMyBatis
0 likes · 9 min read
SpringBoot Multiple Data Source Configuration for Basic Read‑Write Separation
LuTiao Programming
LuTiao Programming
Feb 18, 2026 · Backend Development

5 Advanced Spring Boot Database Configurations to Make Your Code Reviews Shine

This article explains why basic Spring Boot datasource settings are insufficient for production and walks through five advanced configurations—HikariCP tuning, transaction timeout and isolation, read‑write splitting, slow‑SQL monitoring, and security hardening—each illustrated with concrete code snippets and rationale.

Database SecurityHikariCPRead-Write Splitting
0 likes · 8 min read
5 Advanced Spring Boot Database Configurations to Make Your Code Reviews Shine
Top Architect
Top Architect
Feb 15, 2026 · Backend Development

Why Did My Payment Service Lose Data? Uncovering Hidden Transaction Bugs in Spring

A payment service failed to insert orders despite successful payments, showing no errors, occasional lock timeouts, and intermittent success, which was traced to a missing transaction commit that polluted reused connections, causing unrelated business failures until the bug was fixed and preventive measures were added.

JavaSpringconnection pool
0 likes · 11 min read
Why Did My Payment Service Lose Data? Uncovering Hidden Transaction Bugs in Spring
java1234
java1234
Feb 7, 2026 · Backend Development

Why Service Layer Should Not Return a Result Object in Java

The article explains why returning a generic Result wrapper from a Java service layer breaks responsibility separation, harms reusability, complicates exception handling and testing, and obscures transaction boundaries, advocating for returning pure domain objects instead.

Domain-Driven DesignJavaResult Object
0 likes · 13 min read
Why Service Layer Should Not Return a Result Object in Java
Java Companion
Java Companion
Feb 7, 2026 · Backend Development

Why Should the Service Layer in Java Not Return a Result Object Directly?

The article explains that returning a Result wrapper from the Service layer mixes business logic with presentation concerns, leading to tighter coupling, reduced reusability, cumbersome error handling, harder testing, poorer DDD alignment, limited interface flexibility, and ambiguous transaction boundaries.

Domain-Driven DesignJavaResult Wrapper
0 likes · 11 min read
Why Should the Service Layer in Java Not Return a Result Object Directly?
Su San Talks Tech
Su San Talks Tech
Dec 31, 2025 · Backend Development

When Spring @Transactional Fails: Common Pitfalls and Fixes

This article explains why Spring @Transactional may not work as expected, covering issues such as wrong method visibility, final methods, internal calls, missing bean registration, multithreading, unsupported table engines, incorrect propagation settings, swallowed exceptions, and how to resolve each problem.

Backendtransaction management
0 likes · 20 min read
When Spring @Transactional Fails: Common Pitfalls and Fixes
Architect's Tech Stack
Architect's Tech Stack
Dec 24, 2025 · Backend Development

10 Proven Techniques to Supercharge API Performance in Java Applications

This article presents a comprehensive, step‑by‑step guide to optimizing Java‑based API interfaces, covering batch processing, asynchronous execution, caching, pre‑processing, pooling, transaction handling, pagination, SQL tuning, lock granularity, and code restructuring, with practical code examples and diagrams.

API optimizationBatch ProcessingCaching
0 likes · 10 min read
10 Proven Techniques to Supercharge API Performance in Java Applications
Top Architect
Top Architect
Dec 4, 2025 · Backend Development

Designing Robust Payment Systems: Architecture, Flow, and Data Modeling

This article examines the challenges of implementing payment functionality in business systems, breaking down the process into detailed steps, outlining sequence diagrams, proposing a data structure design, and discussing related e‑commerce components such as product and coupon management to ensure reliable, scalable transactions.

System Designarchitecturee-commerce
0 likes · 10 min read
Designing Robust Payment Systems: Architecture, Flow, and Data Modeling
Selected Java Interview Questions
Selected Java Interview Questions
Dec 3, 2025 · Backend Development

Coexisting Multiple DataSources in Spring Boot: No Switching Needed

This guide explains how to configure Spring Boot applications to use multiple coexisting DataSource beans—such as MySQL and TDengine—without runtime switching, covering bean definitions, MyBatis mapper scanning, transaction manager setup, custom @Transactional annotations, and common pitfalls, enabling clean separation of business, log, and time‑series data.

Multiple DataSourceMyBatisSpring Boot
0 likes · 12 min read
Coexisting Multiple DataSources in Spring Boot: No Switching Needed
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 3, 2025 · Backend Development

Mastering Spring Boot 3 TransactionExecutionListener with Real‑World Code

This article introduces Spring Boot 3's TransactionExecutionListener, explains its purpose compared to traditional transaction hooks, provides a complete code example—including entity, service, custom listener, and test cases—and demonstrates how to observe transaction phases and handle both successful commits and rollbacks.

BackendJavaSpring
0 likes · 10 min read
Mastering Spring Boot 3 TransactionExecutionListener with Real‑World Code
IT Architects Alliance
IT Architects Alliance
Nov 4, 2025 · Backend Development

Mastering Distributed Data Consistency: Strategies, Patterns, and Best Practices

This article explores the challenges of maintaining data consistency in distributed microservice architectures, covering CAP theory, consistency models, replication strategies, transaction patterns like Saga and TCC, tooling choices, monitoring practices, and actionable best‑practice recommendations.

CAP theoremData ConsistencyEvent Sourcing
0 likes · 13 min read
Mastering Distributed Data Consistency: Strategies, Patterns, and Best Practices
IT Services Circle
IT Services Circle
Oct 2, 2025 · Backend Development

How Spring Simplifies Transaction Management and Solves Common Pitfalls

This article explains the challenges of manual JDBC transaction handling, introduces Spring's unified transaction API with PlatformTransactionManager, TransactionDefinition, and TransactionStatus, demonstrates code examples for programmatic and declarative transactions, and discusses common pitfalls such as non‑public methods, self‑invocation, and exception handling.

AOPJDBCJava
0 likes · 17 min read
How Spring Simplifies Transaction Management and Solves Common Pitfalls
Senior Xiao Ying
Senior Xiao Ying
Sep 23, 2025 · Backend Development

Mastering Spring Boot Transaction Rollback: A Complete Guide

Spring Boot simplifies transaction management via PlatformTransactionManager and AOP, offering declarative and programmatic approaches, default rollback on runtime exceptions, customizable rollback rules, propagation behaviors, manual rollback techniques, multithreaded transaction handling, and solutions to common pitfalls such as swallowed exceptions and self-invocation issues.

Declarative TransactionsProgrammatic TransactionsSpring Boot
0 likes · 11 min read
Mastering Spring Boot Transaction Rollback: A Complete Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 23, 2025 · Backend Development

Spring Boot 3 Concurrency: Locks, Optimistic & Pessimistic Updates

This article explains common problems of concurrent database updates in Spring Boot 3 and demonstrates five practical solutions—including database locks, optimistic and pessimistic locking, transaction isolation levels, and application‑level locks—accompanied by complete code examples and test results.

ConcurrencyOptimistic LockPessimistic Lock
0 likes · 10 min read
Spring Boot 3 Concurrency: Locks, Optimistic & Pessimistic Updates
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 15, 2025 · Backend Development

Master Spring’s Core: IoC, DI, AOP & Transaction Explained

This article provides a comprehensive overview of the Spring framework, covering its core principles such as Inversion of Control, Dependency Injection, Aspect‑Oriented Programming, and transaction management, while illustrating each concept with diagrams and practical code examples for Java developers.

AOPDependency InjectionJava
0 likes · 7 min read
Master Spring’s Core: IoC, DI, AOP & Transaction Explained
Lakehouse Research Base
Lakehouse Research Base
Aug 28, 2025 · Databases

Why Stream Load Beats INSERT 30x in StarRocks Compute-Storage Separation

In StarRocks compute-storage separation clusters, Stream Load achieves 20-30x faster bulk data ingestion than INSERT by leveraging batch-oriented design, direct compute-node access, single-transaction metadata handling, large-file storage writes, and concentrated resource scheduling, avoiding INSERT's per-row overheads.

Compute-Storage SeparationINSERTStarRocks
0 likes · 11 min read
Why Stream Load Beats INSERT 30x in StarRocks Compute-Storage Separation
Cognitive Technology Team
Cognitive Technology Team
Jul 16, 2025 · Databases

Mastering Dynamic Multi‑DataSource Management in Spring Boot: A Deep Dive

Dynamic‑datasource 4.3.1 offers a powerful AOP‑based, annotation‑driven solution for seamless multi‑database routing, read‑write separation, and load‑balancing in Spring Boot applications, while addressing common pitfalls such as transaction boundaries, connection‑pool configuration, health‑check failures, and version compatibility.

Multi-DataSourcedynamic-datasourcehealth-check
0 likes · 18 min read
Mastering Dynamic Multi‑DataSource Management in Spring Boot: A Deep Dive
Cognitive Technology Team
Cognitive Technology Team
Jul 8, 2025 · Backend Development

Why Your Spring @Transactional Doesn’t Rollback: AOP Aspect Order Conflict Explained

An in‑depth analysis of a Spring transaction failure caused by a custom AOP aspect interfering with the default TransactionInterceptor, detailing the symptom, root cause, and step‑by‑step solutions—including adjusting aspect order, rethrowing exceptions, and manual rollback—to ensure reliable transaction management.

AOPAspect PrioritySpring
0 likes · 8 min read
Why Your Spring @Transactional Doesn’t Rollback: AOP Aspect Order Conflict Explained
Java Interview Crash Guide
Java Interview Crash Guide
Jul 3, 2025 · Backend Development

10 Proven Strategies to Supercharge API Performance in Java

This article presents a comprehensive, step‑by‑step guide to optimizing API latency by applying batch processing, asynchronous execution, caching, pre‑processing, pooling, parallelism, indexing, transaction management, code refactoring, pagination, SQL tuning, and fine‑grained locking techniques.

API optimizationBatch ProcessingCaching
0 likes · 10 min read
10 Proven Strategies to Supercharge API Performance in Java
IT Services Circle
IT Services Circle
Jun 19, 2025 · Backend Development

Why We Skipped TCC: Using Compensation and Local Message Tables for Distributed Transactions

This article explains common distributed‑transaction solutions, describes the author’s own compensation‑plus‑local‑message‑table approach for merging customers across databases, outlines the TCC model with its Try‑Confirm‑Cancel phases, and details why TCC was rejected due to complexity, long resource locks, and rollback issues.

TCCcompensationdistributed transactions
0 likes · 9 min read
Why We Skipped TCC: Using Compensation and Local Message Tables for Distributed Transactions
Programmer1970
Programmer1970
Jun 12, 2025 · Backend Development

Understanding Spring's Transaction Management: PlatformTransactionManager and TransactionSynchronizationManager

The article explains how Spring's PlatformTransactionManager and TransactionSynchronizationManager work together to provide both declarative and programmatic transaction management, detailing their core responsibilities, lifecycle handling, synchronization callbacks, practical use cases, and common troubleshooting steps.

JavaPlatformTransactionManagerSpring
0 likes · 8 min read
Understanding Spring's Transaction Management: PlatformTransactionManager and TransactionSynchronizationManager
Programmer1970
Programmer1970
Jun 11, 2025 · Backend Development

A Comprehensive Overview of Spring Framework’s Transaction Management

This article dissects Spring's transaction management system, detailing its layered architecture, core interfaces such as PlatformTransactionManager, TransactionDefinition and TransactionSynchronization, the lifecycle of transaction start, commit and rollback, programmatic and declarative usage, advanced features like distributed and nested transactions, common pitfalls, and optimization recommendations.

AOPBackendJTA
0 likes · 13 min read
A Comprehensive Overview of Spring Framework’s Transaction Management
Su San Talks Tech
Su San Talks Tech
Jun 7, 2025 · Backend Development

10 Proven Strategies to Supercharge API Performance in Java Applications

This article presents a comprehensive set of practical techniques—including batch processing, asynchronous execution, caching, preprocessing, pooling, parallelization, indexing, pagination, SQL tuning, and lock granularity—to dramatically reduce API latency and improve overall backend system efficiency.

API optimizationBackend PerformanceCaching
0 likes · 12 min read
10 Proven Strategies to Supercharge API Performance in Java Applications
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 1, 2025 · Backend Development

Master Spring Boot 3 DataSource: 8 Practical Connection Management Techniques

This article presents a comprehensive Spring Boot 3 tutorial that explains how the framework manages database connections, introduces eight built‑in DataSource control methods, and provides detailed code examples for configuring HikariCP, using DataSourceUtils, SmartDataSource, TransactionAwareDataSourceProxy, and transaction managers.

JavaSpring Bootbackend development
0 likes · 12 min read
Master Spring Boot 3 DataSource: 8 Practical Connection Management Techniques
ITFLY8 Architecture Home
ITFLY8 Architecture Home
May 28, 2025 · Databases

Mastering Database Sharding: Design Strategies and Practical Cases

This article introduces the fundamentals of database sharding, outlines architectural evolution, explains vertical and horizontal splitting dimensions and strategies, discusses middleware choices, and presents real‑world case studies while addressing common challenges such as ID generation, join queries, pagination, and distributed transactions.

database shardingmiddlewarescalability
0 likes · 8 min read
Mastering Database Sharding: Design Strategies and Practical Cases
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 6, 2025 · Backend Development

Why @Transactional Fails with @Async in Spring Boot 3 – A Deep Dive

This article explains how @Transactional and @Async normally cooperate in Spring Boot, demonstrates cases where the transaction does not roll back when @EnableAsync order is changed, analyzes the underlying AOP proxy creation and bean post‑processor execution order, and introduces new Spring 6.2 transaction‑rollback configuration options.

@Async@TransactionalAOP
0 likes · 9 min read
Why @Transactional Fails with @Async in Spring Boot 3 – A Deep Dive
Code Ape Tech Column
Code Ape Tech Column
Apr 15, 2025 · Backend Development

Understanding the Compatibility of @Transactional and @Async in Spring

This tutorial explains how Spring's @Transactional and @Async annotations work, explores their interaction in various scenarios such as bank‑transfer examples, discusses thread‑context propagation, highlights pitfalls when mixing them, and provides best‑practice recommendations for maintaining data integrity.

@Async@TransactionalAsynchronous Execution
0 likes · 11 min read
Understanding the Compatibility of @Transactional and @Async in Spring
Architect's Tech Stack
Architect's Tech Stack
Mar 17, 2025 · Backend Development

Comprehensive Interface Performance Optimization Strategies

This article presents a systematic guide to improving API response times by applying batch processing, asynchronous execution, caching, pooling, parallelism, indexing, transaction management, pagination, SQL tuning, and proper lock granularity, supplemented with practical Java code examples and diagrams.

Batch ProcessingCachingLock Granularity
0 likes · 10 min read
Comprehensive Interface Performance Optimization Strategies
Top Architect
Top Architect
Mar 13, 2025 · Databases

Choosing Between NewSQL Databases and Middleware‑Based Sharding: Advantages, Trade‑offs and Practical Guidance

The article objectively compares NewSQL distributed databases with middleware‑plus‑sharding solutions, covering architectural differences, distributed transaction handling, high‑availability, scaling, SQL support, storage engines, maturity, and provides a decision‑making checklist to help engineers select the most suitable approach for their workloads.

NewSQLdistributed databaseshigh availability
0 likes · 23 min read
Choosing Between NewSQL Databases and Middleware‑Based Sharding: Advantages, Trade‑offs and Practical Guidance
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
Su San Talks Tech
Su San Talks Tech
Jan 7, 2025 · Databases

7 Common Pitfalls of Database Sharding and How to Solve Them

This article examines seven typical challenges that arise after implementing database sharding—such as global ID conflicts, cross‑shard queries, distributed transactions, shard‑key design, data migration, pagination, and operational overhead—and provides practical solutions and code examples to address each issue.

Database Scalingdistributed systemsid generation
0 likes · 12 min read
7 Common Pitfalls of Database Sharding and How to Solve Them
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 26, 2024 · Backend Development

Programmatic vs Declarative Transactions in Spring Boot 3: When Performance Matters

This article compares Spring Boot's declarative @Transactional annotation with programmatic transaction management using TransactionTemplate, TransactionalOperator, and TransactionManager, explains their suitable scenarios, provides code examples, and presents JMeter performance tests that show how the right choice can dramatically improve throughput.

Declarative TransactionsProgrammatic TransactionsSpring Boot
0 likes · 10 min read
Programmatic vs Declarative Transactions in Spring Boot 3: When Performance Matters
Programmer1970
Programmer1970
Dec 8, 2024 · Backend Development

Advanced Spring Interview Questions: Bean Lifecycle, AOP, Transactions, ApplicationContext vs BeanFactory, Type Conversion

This article compiles twelve advanced Spring interview questions covering bean initialization and lifecycle, AOP implementation, transaction management, the differences between ApplicationContext and BeanFactory, type conversion mechanisms, dependency injection, circular dependency resolution with three‑level caches, the event system, @Transactional and @Async annotations, and the inner workings of DispatcherServlet.

AOPBean LifecycleDependency Injection
0 likes · 21 min read
Advanced Spring Interview Questions: Bean Lifecycle, AOP, Transactions, ApplicationContext vs BeanFactory, Type Conversion
Su San Talks Tech
Su San Talks Tech
Oct 19, 2024 · Backend Development

Master Distributed Transactions with Seata: From Theory to AT Mode Implementation

This article explains the fundamentals of distributed transactions, the CAP theorem, various transaction patterns such as 2PC, 3PC, TCC, Saga, and introduces Seata's AT mode with step‑by‑step setup of the TC coordinator and microservice clients, culminating in a working e‑commerce example and key best‑practice takeaways.

AT ModeSeatadistributed transactions
0 likes · 41 min read
Master Distributed Transactions with Seata: From Theory to AT Mode Implementation
Top Architect
Top Architect
Oct 8, 2024 · Backend Development

Design and Architecture of Payment Business Systems

This article analyzes the complexities of payment business logic, breaks down the workflow into modular components, illustrates sequence diagrams, discusses related domains such as product and coupon management, and summarizes key technical considerations like transaction handling, locking, and settlement.

backend architecturee-commercepayment
0 likes · 10 min read
Design and Architecture of Payment Business Systems
Lobster Programming
Lobster Programming
Sep 21, 2024 · Backend Development

Mastering Spring Boot Transaction Hooks for Advanced Business Logic

This article explains how Spring Boot’s @Transactional annotation works, introduces programmatic transaction management, and demonstrates how to create custom transaction hook functions with TransactionSynchronizationManager and TransactionSynchronization to execute custom logic at each transaction phase, improving robustness and maintainability.

JavaSpring BootSpring Framework
0 likes · 4 min read
Mastering Spring Boot Transaction Hooks for Advanced Business Logic
WeiLi Technology Team
WeiLi Technology Team
Aug 19, 2024 · Backend Development

How to Upgrade Spring Boot for MongoDB Transaction Support

This guide explains why upgrading from Spring Boot 1.5 to 2.1 is essential for MongoDB transaction management, outlines version requirements, highlights key feature changes, and provides step‑by‑step instructions with code examples to enable reliable transactional operations in a Spring‑based backend.

MongoDBSpring Bootbackend development
0 likes · 11 min read
How to Upgrade Spring Boot for MongoDB Transaction Support
Tencent Cloud Developer
Tencent Cloud Developer
Jul 5, 2024 · Databases

Database Systems Reading List: Fundamentals, Design, Engines, and Optimizations

This curated bibliography compiles seminal database‑system papers—spanning foundational relational theory, system design for RDBMS and NoSQL, SQL engine optimization, storage structures, transaction and scheduling mechanisms, plus workload, networking, quality, and tuning research—each entry listing title, authors, year and a PDF link for scholars and practitioners.

Query Optimizationdatabase systemsreading list
0 likes · 25 min read
Database Systems Reading List: Fundamentals, Design, Engines, and Optimizations
Su San Talks Tech
Su San Talks Tech
Jun 30, 2024 · Backend Development

How to Ensure Transaction Rollback Across Asynchronous Threads in Spring

This article explains how to guarantee that when any asynchronous thread fails during a large Excel import, the main thread can roll back all related transactions, covering the limitations of @Transactional and @Async, thread‑local propagation, and practical solutions using Future, CompletableFuture, custom ForkJoinPool, and manual transaction management.

Asynchronous ProgrammingJavaSpring
0 likes · 20 min read
How to Ensure Transaction Rollback Across Asynchronous Threads in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 14, 2024 · Backend Development

How Spring 6.2 Eliminates Bean Initialization Blocking and Boosts Startup Speed

Spring 6.2 introduces asynchronous bean initialization, a new addSingletonCallback mechanism, global transaction rollback settings, and injection performance optimizations, eliminating blocking during multi‑threaded event publishing and dramatically reducing startup time, as demonstrated with code examples and performance test results.

Bean InitializationPerformance Optimizationmultithreading
0 likes · 9 min read
How Spring 6.2 Eliminates Bean Initialization Blocking and Boosts Startup Speed
Architect
Architect
Mar 25, 2024 · Backend Development

Designing Payment Business Architecture: Process Decomposition, Sequence Diagram, and Structural Design

The article explains how to analyze, decompose, and design a payment system by breaking the workflow into modules, illustrating pre‑payment, third‑party integration, and post‑payment stages with sequence diagrams, and proposing a data‑structure model that covers account management, transaction records, order handling, and related business components.

Data Modelingarchitecturepayment
0 likes · 10 min read
Designing Payment Business Architecture: Process Decomposition, Sequence Diagram, and Structural Design
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 29, 2024 · Backend Development

Why Spring Transactions Fail and How to Fix Them

This article examines common scenarios that cause Spring transaction management to fail—such as non‑public methods, swallowed exceptions, incorrect rollback settings, self‑invocation, final methods, wrong propagation, asynchronous threads, unsupported database engines, and misuse of @Transactional—and provides concrete code‑level solutions to ensure reliable transactional behavior.

@TransactionalJavaSpring
0 likes · 10 min read
Why Spring Transactions Fail and How to Fix Them
Java Architect Essentials
Java Architect Essentials
Dec 22, 2023 · Backend Development

A Comprehensive Overview of MyBatis Architecture and Core Components

This article provides a detailed, global‑level review of MyBatis, covering its main features such as SQL mapping, dynamic SQL, parameter and result mapping, transaction management, connection‑pool integration, second‑level cache, as well as the three‑layer architecture, configuration parsing, proxy creation, and SQL execution process.

BackendJavaMyBatis
0 likes · 9 min read
A Comprehensive Overview of MyBatis Architecture and Core Components
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 16, 2023 · Backend Development

Master Spring Bean Injection: Prototype in Singleton, Lazy, Transactions & More

This guide explains how to handle various Spring bean injection and transaction challenges, including injecting prototype beans into singletons, using @Lazy, registering abstract beans, resolving multiple bean conflicts, forcing rollback without exceptions, injecting static fields, ensuring transaction consistency, enabling non‑public transactional methods, custom component scanning, and adding interfaces via AOP.

Bean ScopeDependency InjectionJava
0 likes · 12 min read
Master Spring Bean Injection: Prototype in Singleton, Lazy, Transactions & More
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 8, 2023 · Backend Development

Spring Transaction Deep Dive: Thread‑Bound Connections and Multithreaded Consistency

This article explains Spring's transaction core, showing how TransactionInterceptor and TransactionAspectSupport use AOP to bind a Connection to ThreadLocal, walks through key code snippets for creating, committing, and rolling back transactions, and demonstrates a JUC‑based solution for maintaining transaction consistency across multiple threads.

JavaJdbcTemplateSpring
0 likes · 9 min read
Spring Transaction Deep Dive: Thread‑Bound Connections and Multithreaded Consistency
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 18, 2023 · Backend Development

Why MyBatis SqlSession Crashes with Multiple Threads and How Spring Fixes It

This article examines the ClassCastException that occurs when 100 threads concurrently query MyBatis using a shared SqlSession, analyzes the root cause in DefaultSqlSession and BaseExecutor, and explains how Spring Boot’s MyBatis integration employs SqlSessionTemplate, ThreadLocal binding, and transaction management to guarantee thread‑safe SqlSession usage.

MyBatisSpring BootSqlSession
0 likes · 21 min read
Why MyBatis SqlSession Crashes with Multiple Threads and How Spring Fixes It
JD Cloud Developers
JD Cloud Developers
Aug 31, 2023 · Backend Development

Mastering Spring Transaction Management: From Basics to Advanced Scenarios

This article explains why transaction management is essential, how Spring abstracts resource handling, supports nested transactions and propagation behaviors, and compares declarative (annotation) and programmatic approaches, providing practical code examples and a deep dive into the underlying TransactionManager model.

JavaSpringbackend development
0 likes · 18 min read
Mastering Spring Transaction Management: From Basics to Advanced Scenarios
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 19, 2023 · Backend Development

Master Spring Boot Transaction Management with TransactionTemplate and PlatformTransactionManager

This guide explains Spring Boot's programmatic transaction management using TransactionTemplate, TransactionCallback, and PlatformTransactionManager, covering configuration, rollback handling, event listeners, and when to prefer programmatic versus declarative approaches, complete with code examples.

JavaPlatformTransactionManagerSpring Boot
0 likes · 8 min read
Master Spring Boot Transaction Management with TransactionTemplate and PlatformTransactionManager
Shepherd Advanced Notes
Shepherd Advanced Notes
Aug 14, 2023 · Backend Development

Common @Transactional Pitfalls in Spring Boot Business Code and How to Avoid Them

This article analyzes frequent scenarios where Spring's @Transactional annotation fails in Spring Boot projects—such as self-invocation, swallowed exceptions, misconfigured rollback rules, non‑public methods, wrong propagation settings, and long‑running transactions—and provides concrete fixes to prevent data inconsistency and performance issues.

@TransactionalCGLIB proxySpring Boot
0 likes · 17 min read
Common @Transactional Pitfalls in Spring Boot Business Code and How to Avoid Them
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 1, 2023 · Backend Development

Boost Spring Boot Throughput: Programmatic Transaction Management vs @Transactional

This article demonstrates how using Spring Boot's TransactionTemplate to programmatically control transactions can prevent long‑running non‑transactional operations from blocking database connections, thereby increasing system throughput compared to the traditional @Transactional annotation, with detailed code examples and performance observations.

JPAJavaPerformance
0 likes · 6 min read
Boost Spring Boot Throughput: Programmatic Transaction Management vs @Transactional
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 31, 2023 · Backend Development

How Spring Uses AOP to Implement Transaction Management

This article explains why transaction control is essential for database‑backed applications, compares native JDBC/MyBatis handling with Spring's unified approach, details the core transaction APIs, and walks through the AOP‑based mechanism—including @EnableTransactionManagement, proxy generation, and CGLIB interception—that automatically opens, commits, and rolls back transactions at runtime.

@TransactionalAOPCGLIB
0 likes · 20 min read
How Spring Uses AOP to Implement Transaction Management
Sanyou's Java Diary
Sanyou's Java Diary
Jul 13, 2023 · Backend Development

Mastering Distributed Transactions with Seata: Theory, Options, and Hands‑On Practice

This article explains the concept of distributed transactions, compares common solutions such as 2PC, 3PC, TCC, and message‑based eventual consistency, and provides a detailed walkthrough of configuring and using the Seata middleware—including AT mode workflow, server and client setup, and real‑world testing—so developers can confidently implement reliable cross‑service transactions.

2PCAT ModeSeata
0 likes · 18 min read
Mastering Distributed Transactions with Seata: Theory, Options, and Hands‑On Practice
Shopee Tech Team
Shopee Tech Team
Jul 13, 2023 · Backend Development

Design and Implementation of seadt-SAGA Distributed Transaction Framework

The article details Shopee’s seadt‑SAGA framework—a Go‑based distributed transaction solution that implements the SAGA pattern via two modes, orchestration with a central coordinator and collaboration with embedded logic, explains their state‑machine designs, compares rollback ordering using vector clocks versus sequence numbers, and discusses each mode’s trade‑offs.

GoSAGAcollaboration
0 likes · 23 min read
Design and Implementation of seadt-SAGA Distributed Transaction Framework
Su San Talks Tech
Su San Talks Tech
Jul 11, 2023 · Backend Development

Why MyBatis‑Plus’s saveBatch Triggers Unexpected Transaction Rollbacks and How to Fix It

The article explains why the error "Transaction rolled back because it has been marked as rollback‑only" occurs in a Java Spring service when using MyBatis‑Plus saveBatch, how hidden @Transactional annotations cause hidden nested transactions, and presents a practical workaround by replacing the batch operation with a custom mapper.

JavaMyBatis-PlusSpring
0 likes · 7 min read
Why MyBatis‑Plus’s saveBatch Triggers Unexpected Transaction Rollbacks and How to Fix It
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 TransactionSpring
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions
Architect's Guide
Architect's Guide
Jun 15, 2023 · Databases

Splitting a Massive MySQL Financial Transaction Table: Challenges, Design, and Implementation

The article describes how a finance team tackled a 50‑million‑row MySQL transaction table by analyzing the pain points, defining split goals, selecting sharding‑jdbc, designing multi‑source transaction handling, pagination across shards, data migration strategies, and a staged rollout to ensure stability and performance.

Database ScalingMySQLTable Sharding
0 likes · 10 min read
Splitting a Massive MySQL Financial Transaction Table: Challenges, Design, and Implementation
ITPUB
ITPUB
May 21, 2023 · Databases

Mastering Database Sharding: When, How, and Pitfalls of Partitioning

This article explains the concept, motivations, design methods, common patterns, and trade‑offs of database sharding (both table and database level), offering practical code examples, scalability criteria, and guidance on avoiding over‑engineering while considering alternatives like TiDB.

Hash ShardingPartitioningRange Sharding
0 likes · 19 min read
Mastering Database Sharding: When, How, and Pitfalls of Partitioning
MaGe Linux Operations
MaGe Linux Operations
May 14, 2023 · Backend Development

10 Proven Strategies to Supercharge API Performance in Legacy Projects

Discover a comprehensive set of ten practical techniques—including batch processing, asynchronous execution, caching, pooling, parallelization, indexing, transaction management, and SQL tuning—to dramatically reduce API latency and improve efficiency in legacy backend systems, illustrated with real-world examples and code snippets.

API performanceasynchronous-processingbackend optimization
0 likes · 8 min read
10 Proven Strategies to Supercharge API Performance in Legacy Projects
Architecture Digest
Architecture Digest
Apr 26, 2023 · Backend Development

Common API Performance Optimization Strategies

This article outlines a comprehensive set of backend API performance optimization techniques—including batch processing, asynchronous execution, caching, pre‑processing, pooling, parallelization, indexing, transaction handling, SQL tuning, and lock granularity—to reduce latency and improve system efficiency.

API performanceAsynchronous ExecutionSQL indexing
0 likes · 9 min read
Common API Performance Optimization Strategies
IT Architects Alliance
IT Architects Alliance
Apr 23, 2023 · Backend Development

Common Interface Performance Optimization Strategies

This article outlines a comprehensive set of backend interface optimization techniques—including batch processing, asynchronous execution, caching, pre‑processing, pooling, parallelization, indexing, transaction sizing, code restructuring, deep pagination, SQL tuning, and lock granularity—to reduce latency and improve overall system efficiency.

API optimizationAsynchronous ExecutionBatch Processing
0 likes · 8 min read
Common Interface Performance Optimization Strategies
Architect
Architect
Apr 20, 2023 · Backend Development

Common Interface Performance Optimization Strategies

This article summarizes practical techniques for reducing API latency, including batch processing, asynchronous execution, caching, pre‑processing, pooling, parallelization, indexing, transaction size control, program structure refactoring, deep pagination handling, SQL tuning, and proper lock granularity.

API optimizationBackend PerformanceIndexing
0 likes · 9 min read
Common Interface Performance Optimization Strategies
Top Architect
Top Architect
Apr 10, 2023 · Databases

Dynamic Multi‑DataSource Management and Transaction Handling in Spring

The article explains how to dynamically manage multiple data sources and ensure transaction consistency in Spring applications by extending AbstractRoutingDataSource, using configuration‑file or database‑table approaches, and applying AOP‑based switching with custom transaction management.

AbstractRoutingDataSourceDynamicDataSourceJava
0 likes · 16 min read
Dynamic Multi‑DataSource Management and Transaction Handling in Spring
Code Ape Tech Column
Code Ape Tech Column
Apr 7, 2023 · Backend Development

Dynamic Multi-DataSource Management and Transaction Handling in Spring

This article explains how to dynamically manage multiple data sources and ensure transaction consistency across them in Spring applications, covering both configuration‑file and database‑table approaches, custom AOP switching, and a bespoke multi‑database transaction mechanism.

JavaSpringbackend development
0 likes · 14 min read
Dynamic Multi-DataSource Management and Transaction Handling in Spring
macrozheng
macrozheng
Apr 3, 2023 · Backend Development

Boost API Performance: 11 Proven Backend Optimization Techniques

This article presents a comprehensive set of backend API optimization strategies—including batch processing, asynchronous execution, caching, pre‑processing, pooling, parallelization, indexing, transaction management, code restructuring, deep pagination, SQL tuning, and lock granularity—to dramatically reduce response times and improve system efficiency.

API optimizationBackend PerformanceIndexing
0 likes · 10 min read
Boost API Performance: 11 Proven Backend Optimization Techniques
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 27, 2023 · Backend Development

Master Spring Transaction Abstraction: Platform & Reactive Managers

This article explains Spring's transaction abstraction, detailing the roles of PlatformTransactionManager and ReactiveTransactionManager, the TransactionDefinition attributes, TransactionStatus interface, resource synchronization techniques, declarative transaction management with AOP, rollback rules, and provides XML and Java configuration examples for both JDBC and Hibernate environments.

Declarative TransactionsJavaReactive Programming
0 likes · 16 min read
Master Spring Transaction Abstraction: Platform & Reactive Managers
Top Architect
Top Architect
Feb 27, 2023 · Backend Development

Understanding Spring Transaction Management: @EnableTransactionManagement, Transaction Propagation, and Synchronization

This article explains how Spring enables transaction management through @EnableTransactionManagement, details the underlying proxy mechanism, outlines the basic and detailed execution flow, describes transaction propagation types and their classifications, and shows how to force rollback and use TransactionSynchronization for custom callbacks.

JavaSpringbackend development
0 likes · 13 min read
Understanding Spring Transaction Management: @EnableTransactionManagement, Transaction Propagation, and Synchronization
ITPUB
ITPUB
Feb 10, 2023 · Backend Development

Designing Clean Application Services in DDD: Principles & Best Practices

This article explains how application services act as a façade for domain models, outlines key design principles, shows practical Go/Java implementation patterns, discusses transaction propagation and security handling, and provides concrete best‑practice recommendations for building thin, framework‑agnostic backend services.

Application ServiceDDDDTO
0 likes · 17 min read
Designing Clean Application Services in DDD: Principles & Best Practices
Code Ape Tech Column
Code Ape Tech Column
Feb 8, 2023 · Backend Development

Enhancing MVC Architecture with a Manager Layer in Java

The article explains the classic three‑layer MVC pattern, its shortcomings in complex Java projects, and proposes adding a Manager layer to separate generic business processing, reduce transaction scope, and improve code organization, illustrated with Spring‑based code examples.

JavaMVCService
0 likes · 9 min read
Enhancing MVC Architecture with a Manager Layer in Java

Database Independence Migration for Yanxuan Trading System: Architecture Evolution and Implementation

Yanxuan migrated its monolithic trading system from a shared DDB cluster to an independent database by using Netease Data Canal for real‑time sync, a write‑stop switch with Pandora middleware, account and permission isolation, and extensive testing across three phases to ensure data consistency and minimal business impact.

Data ConsistencyEnterprise Databasebig data integration
0 likes · 15 min read
Database Independence Migration for Yanxuan Trading System: Architecture Evolution and Implementation