Show TOC Start of Content Area

Background documentation Locks Locate the document in its SAP Library structure

The concept of locks is closely related to the concept of transaction isolation. Transaction isolation makes sure that two simultaneously running transactions do not affect each other. Transaction isolation levels are realized by setting locks on read or changed rows in a database table. Databases provide multiple isolation levels that determine how strong the isolation is between two simultaneously running transactions. Experience shows that if the isolation is stronger, throughput and scalability decrease. For more information, see Structure linkConnection Transaction Isolation in the Architecture Manual.

 

We recommend that you choose a locking strategy and apply it consistently throughout all application components. You can choose from two available locking techniques:

·        Database locks

With database locks, you apply the locking technique provided by your database vendor. For more information, see the documentation of your database.

This graphic is explained in the accompanying text

Database vendors do not offer uniform semantics for locks. For portability reasons, we recommend that you use logical locks.

·        Logical locks

With logical locks, you use a locking technique provided and managed centrally by the Web AS Java. Logical locks are managed by the Enqueue Server via a central lock table. J2EE applications use the LogicalLocking and TableLocking interfaces provided by the Locking Adapter Service. These interfaces access the Locking Manager, which in turn communicates with the Enqueue Server. For more information, see Structure linkArchitecture of the Locking Adapter Service in the Architecture Manual.

 

For more information about logical locks, see:

Logical Locks

Working with Locks

Setting Locks

Releasing Locks

 

End of Content Area