Tagged articles
4 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 10, 2024 · Backend Development

Why Does Spring Data JPA Insert Duplicate Users? Transaction & Lock Solutions

This article explains why a SpringBoot 3.0.9 application creates duplicate user rows when sending confirmation emails, analyzes the transactional behavior causing the issue, and presents three solutions—including pessimistic locking, narrowing transaction scope, and an event‑driven approach—to ensure data consistency.

EventDrivenPessimisticLockSpringBoot
0 likes · 8 min read
Why Does Spring Data JPA Insert Duplicate Users? Transaction & Lock Solutions
Su San Talks Tech
Su San Talks Tech
Jan 17, 2022 · Backend Development

Understanding Optimistic vs Pessimistic Locks and Advanced Java Lock Types

This article explains the concepts, differences, and appropriate use cases of optimistic and pessimistic locks, exclusive and shared locks, mutex and read‑write locks, fair and unfair locks, reentrant, spin, segment locks, lock upgrades, and lock‑optimization techniques in Java concurrency programming.

LocksOptimisticLockPessimisticLock
0 likes · 13 min read
Understanding Optimistic vs Pessimistic Locks and Advanced Java Lock Types
JavaEdge
JavaEdge
Dec 11, 2021 · Backend Development

Master Java Locks: From Pessimistic to Optimistic and Beyond

This article explains the full spectrum of Java concurrency locks—including pessimistic, optimistic, exclusive, shared, fair, unfair, segment, reentrant, and spin locks—detailing their principles, typical use cases, implementation details, and code examples to help you ace interview questions.

CASLocksOptimisticLock
0 likes · 12 min read
Master Java Locks: From Pessimistic to Optimistic and Beyond