Transaction Support

Previous Next

For transaction components, USoft supports a local transaction mechanism.

When the Rules Engine performs a commit, it first calls the PreCommit method for each transaction component involved. If all PreCommit calls are successful, the Rules Engine commits all transaction components.

When the Rules Engine performs a rollback, it calls the Rollback method of all transaction components.

PreCommit

This method checks whether changes made by the InsertRow, UpdateRow, or DeleteRow method are correct. It must return 1 for OK, and 0 or –1 for fail. If –1 is returned, the transaction is rolled back.

Commit

Has no input, output or return parameters. When called, this method permanently stores all data that has been changed by the InsertRow, UpdateRow, and DeleteRow methods.

Rollback

Has no input, output or return parameters. When called the method undoes all changes made by the InsertRow, UpdateRow, and DeleteRow methods.

For Global transaction support, USoft relies on external tools like MTS/COM+ and Distributed Transaction Coordinator.

See Also

Error Handling for Transaction Components