Patent ID: 9594793
Date: 2017-03-14
CPC Classifications: G06F

Claim:
1. A method for managing multiple requests to allocate real world resources in a multi-user environment, the method comprising: receiving, from a user application in a plurality of user applications, a request to one open a file access block (FAB) to access and lock a file in a database, the file representing at least one resource shared among the plurality of user applications, and the request including open FAB input parameters of allocating the FAB using the FAB input parameters and locking the file for a given amount of time based on the lock mode; allocating an inner FAB, allowing the user application concurrent access to multiple files, wherein open multiple FABs are opened in a nested structure, wherein the inner FAB includes lock mode access that is different than the lock mode access of the FAB, thereby resulting in two nested FABS with different lock modes and lock holding times; avoiding deadlock by ensuring that inner FABs only lock the files representing resources later in time in a resource ordering scheme than any other current locks held by the user application; sending a search request to locate a record within the file and to either obtain one or more locks related to the record or to build a list of record identifiers; receiving return data representing one of a single record that is available for update, a single record for read access only, or a list of record identifiers; sending the return data to the user application; receiving, from the user application, a request to close the FAB with at least one FAB closing parameter that includes one of apply changes or discard changes; sending a lock validation request to the database to ensure any locks in place related to the search specification are still valid; applying updates to file data; releasing any held locks independently on each file accessed by the user application, without waiting for other outer FAB data accesses to complete, such that when control exits from a FAB, file locks associated with that FAB are immediately released; discarding any list of identifiers matching read only record keys identifiers; and sending a success code to the user application.