摘要 |
The Invention relates to a method for locking data objects in a computer system, the method comprising a first processing module requesting a lock service module to lock one or more (n) data objects for access for further data processing modules by creating one or more lock objects for the one or more data objects, said method further comprising: - the lock service receiving names of one or more (m) key fields of the one or more data objects to be locked; - the lock service receiving n values for each of the m key fields of n data objects to locked; - the lock service receiving a maximum number (k) of locks to lock the n data objects; - the lock service checking whether n < =k and in case yes, creating one or more lock objects comprising the m names and n values for the m key fields in case no, querying the n values of the m key fields and determining numbers (yl to ym) of different values (Val_1.1 to Val_m.ym) of the key fields 1 to m; - the lock service determining consecutively from a first to i-th field where i < =m until yl*...*yi > = k and in case the condition is satisfied, - creating one or more lock objects comprising the names of the key fields 1 to m and values Val_1.1 to Val_(i-1).y(i-1) for the key fields 1 to i-l and comprising wildcards for the remaining key fields.
|