Sunday, April 17, 2022

Spring Transaction Attributes

ACID

Atomicity : 

Consistency :  Data is in a consistent state when a transaction starts and when it ends.

  •  A transaction either creates a new/modified and valid state of data, or, if any failure occurs during transaction then returns all data to its state before the transaction was started.
  • The word consistency means that the value should remain preserved always. In DATABASE, the integrity of the data should be maintained, which means if a change in the database is made, it should remain preserved always.
  • Database changes made by a transaction are invisible to other users until the transaction is committed. In a multi-user environment, where more than one transaction is open concurrently, this behavior maintains database consistency.
Isolation : 
Durability : 

 Question:- What are transaction attributes?

Propagation

  1. PROPAGATION_REQUIRED
  2. PROPAGATION_SUPPORTS
  3. PROPAGATION_MANDATORY
  4. PROPAGATION_REQUIRES_NEW
  5. PROPAGATION_NOT_SUPPORTED
  6. PROPAGATION_NEVER
  7. PROPAGATION_NESTED

Isolation

  • Dirty Reads
  • Non Repeatable Reads
  • Phantom Reads

The below isolation levels are supported by spring.

  1. ISOLATION_DEFAULT
  2. ISOLATION_READ_UNCOMMITTED
  3. ISOLATION_READ_COMMITTED
  4. ISOLATION_REPEATABLE_READ
  5. ISOLATION_SERIALIZABLE

Read Only

Timeout

Rollback Rules

No comments:

Post a Comment