[Studies] Spring Transaction

명원식·2023년 8월 17일
0

Studies

목록 보기
8/9
post-thumbnail
post-custom-banner

트랜잭션(Transaction)

  • Managing multiple DML (Data Manipulation Language) statements as a single logical unit of work.
  • Ensures consistency of work by processing using an "All or Nothing" approach.
  • In web applications, each method in the Service class performs a unit of functionality for the application.

Examples of Functionality Bundled for Processing in Web Applications

  • When viewing a post in a bulletin board, the functionality to retrieve the post and update the view count.
  • When placing an order in an online store, the functionality to register the ordered item and update the buyer's points.
  • When performing a fund transfer in a bank, the functionality to update the sender's and receiver's balances.

Before Applying Transactions: Bank Account Transfer

  • Ex. If both Hong Gil-dong and Kim Yu-shin's account balances are updated successfully, the changes are finally committed.
  • If any issue arises in between, all previous operations are rolled back.

Various Transaction Attributes in Spring

Possible Values for the propagation Attribute

Possible Values for the isolation Attribute

profile
but i brought potato salad
post-custom-banner

1개의 댓글

comment-user-thumbnail
2023년 8월 17일

개발자로서 배울 점이 많은 글이었습니다. 감사합니다.

답글 달기