Show TOC

Background documentationLocks Locate this document in the navigation 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.

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.

    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 AS Java. Logical locks are managed by the Enqueue Server via a central lock table. Java EE applications use the LogicalLocking and TableLocking interfaces provided by the Application Locking Service.

    More information:

    Locking in AS Java: Architecture