Patent ID: 7707194

Claim:
A method, comprising: reading program code from a memory and processing said program code with a processing unit to perform the following: receiving at a first application programming interface (API) a lock request requesting a lock and identifying an amount of data in a table of a database server for which the lock is requested, wherein said lock request is read lock request, the receiving including receiving an indication that said row of data is to be shared with other read locks during said read lock and that said read lock is to be optimistic, the lock request to be serviced by a logical locking function remote from the database server, the logical locking function including a second API, the lock request received at the first API in a first format including an identifier of the table and primary key information identifying a row of data in the table, the primary key information including values for each of two or more columns of the table, wherein the values are ordered according to a first order; in response to the receiving the lock request, the first API converting said received lock request from the first format into a second format suitable for reception by the second API, said converting comprising: creating a first parameter for said second format by combining an identifier of said first API and an identifier of said database table, the first API retrieving from a database dictionary data describing a structure of the row of data, the retrieving based on the identifier of the table in the received lock request, and creating a second parameter for said second format, the second parameter including the values for each of the two or more columns included in the received lock request, wherein the values for each of the two or more columns are reordered and concatenated in the second parameter according to a second order of the retrieved data describing the structure of the row of data, the second order different from the first order; and sending said converted lock request in said second format from the first API to the logical locking function via the second API, the converted lock request including the first parameter and the second parameter, wherein the logical locking function responds to the sending of the converted lock request by initiating servicing of the requested lock; and receiving an indication that a write following an optimistic read is to be a propagation from said optimistic read to an exclusive write.