Patent ID: 7337441

Claim:
A method for transaction processing in a computer system that synchronizes callbacks with the completion of said transaction, comprising the steps of receiving a request from a client to process a transaction at a plurality of servers; registering during an active phase of the transaction an initial set of resources that are to take part in the transaction; determining a state of the transaction to reflect the initial set of resources, and a chain of servers on which those resources exist; subsequently receiving a request from a client to call a transaction commit; prepreparing said transaction during a preprepare phase of the transaction, including the substeps of handing off the transaction to a first server in the plurality of servers, calling any resource callbacks that are registered locally at the first server, determining if a second server is in the chain, and if so communicating a preprepare request to the second server, allowing the second server to dynamically add an additional resource to said set of registered resources, including when the additional resource is at an additional server then adding a next server to the chain, and modifying the state of the transaction to reflect both the next server in the chain, and the additional resource thereon, repeating the preprepare steps in a circular flow as necessary until all servers in the chain have completed the preprepare phase, communicating a preprepare reply from the server that was last called in the chain to the first server; preparing the resources in said set of registered resources; and committing the resources in the set of registered resources.