Patent ID: 7653628

Claim:
A computer-implemented method for processing database entries by an application running on a computer, the application to apply locks on database entries and update the database entries in a database, the method comprising: locking a database entry in the database in accordance with an assigned isolation level, wherein the assigned isolation level is selected from a group of isolation levels responsive to an analysis of the database entry and the group of isolation levels, the group of isolation levels consisting of: a first isolation level to lock the database entry in the database responsive to receiving a read request for the database entry from the application; a second isolation level to lock the database entry in the database if a first cached update of the database entry is different from a version of the database entry in the database; and a third isolation level to lock the database entry in the database if a last update of the database entry cached prior to completion of the execution of the application is different from the version of the database entry in the database; wherein locking the database entry includes: requesting a lock for the database entry; receiving a lock for the database entry if the database entry is not already locked in response to a previous request; receiving an exception in response to the lock request if the database entry is already locked in response to another request; and for each exception, repeating the lock request for the database entry until either the lock is received or a specified number of retries is reached; and updating the database entry in the database after completion of the execution of the application by replacing the database entry in the database with the last cached update of the database entry.