---
title: "Discussion on \"Optimistic and Pessimistic Locking in JPA\" | Hashnode"
description: "Discussion on \"Optimistic and Pessimistic Locking in JPA\". 💡 Khóa (locking)  là một cơ chế cho phép  thực hiện công việc song song  với  cùng một dữ liệu  trong cơ sở dữ liệu. Khi có nhiều giao dịch (transaction) cố gắng truy cập cùng một dữ liệu cùng lúc, các khóa sẽ được sử dụng để  đảm bảo rằng chỉ có mộ..."
url: "https://hashnode.com/posts/optimistic-and-pessimistic-locking-in-jpa/677df21e9782f011effc9afd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Optimistic and Pessimistic Locking in JPA](https://ituniverse.hashnode.dev/optimistic-and-pessimistic-locking-in-jpa?utm_source=hashnode&utm_medium=feed)

💡 Khóa (locking) là một cơ chế cho phép thực hiện công việc song song với cùng một dữ liệu trong cơ sở dữ liệu. Khi có nhiều giao dịch (transaction) cố gắng truy cập cùng một dữ liệu cùng lúc, các khóa sẽ được sử dụng để đảm bảo rằng chỉ có mộ...

Jan 8, 2025 · 17 min read · ituniverse.hashnode.dev  
Read the article

-   [#jpa](https://hashnode.com/tag/jpa)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#spring-data-jpa](https://hashnode.com/tag/spring-data-jpa)
-   [#java](https://hashnode.com/tag/java)
-   [#locking](https://hashnode.com/tag/locking)

## Written by

[Quan Nguyen](https://hashnode.com/@quannv)

@quannv · Ha Noi, Viet Nam

  
[View profile](https://hashnode.com/@quannv)

Backend Developer

A highly motivated back-end developer with 3 years of experience in designing, developing, and deploying scalable microservices using Java, Spring, Kafka, and other relevant technologies. Proven expertise in delivering highperformance solutions for SQL databases, efficiently handling millions of requests daily. Eager to contribute to the growth of a fast-paced technology company by driving the development of innovative and impactful software solutions.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
