Question d’entretien chez Oracle

difference between read lock and write lock

Réponse à la question d'entretien

Utilisateur anonyme

1 août 2023

The difference between LockModeType.Read and LockModeType.Write lies in the level of access and the type of lock. LockModeType.Read allows multiple transactions to read the entity simultaneously but restricts updates and deletes. On the other hand, LockModeType.Write grants an exclusive lock, allowing only one transaction at a time to modify or delete the entity, and it also prevents other transactions from acquiring any type of lock on the same entity.