Patent ID: 7346632

Claim:
A computerized method for executing a nested transaction for computing data in an execution environment supporting a flat transaction only, and wherein a nested transaction encapsulates between a first StartTransaction operation and a corresponding first EndTransaction operation on a first nesting level a hierarchy of one or more further StartTransaction operations and corresponding further EndTransaction operations on further nesting levels, wherein a StartTransaction operation starts a transaction; and wherein an EndTransaction operation ends a transaction; and said method further comprising performing a StartTransaction operation by, checking whether said StartTransaction operation is on the first testing level of said nested transaction, and issuing a corresponding StartTransaction operation within said execution environment only when said StartTransaction operation is on the first testing level of said nested transaction said method performing an EndTransaction operation by: checking, in case said EndTransaction operation is a CommitTransaction operation successfully terminating a transaction, whether said EndTransaction operation is on said first nesting level of said nested transaction, and issuing a corresponding CommitTransaction operation within said execution environment only when said EndTransaction operation is on said first nesting level of said nested transaction; said method performing an EndTransaction operation in case said EndTransaction operation is a RollbackTransaction operation aborting a transaction as unsuccessful, by issuing a corresponding RollbackTransaction operation within said execution environment independent from the nesting level of said RollbackTransaction operation; said method performing, once a RollbackTransaction operation has been executed within said nested transaction, any further StartTransaction operation or any further EndTransaction operation within said nested transaction independent from its nesting level by rejecting it as being in error without issuing a corresponding StartTransaction operation or a corresponding EndTransaction operation to the execution environment, and wherein said method: checks the nesting level of any of said StartTransaction or EndTransaction operations by a depth counter, increments said depth counter in the case of processing a StartTransaction operation, and decrements said depth counter in the case of processing an EndTransaction operation which is a CommitTransaction operation, and sets said depth counter to zero or an invalid value in the case of processing an EndTransaction operation which is a RollbackTransaction operation.