IERUTransaction

A Transaction object can be used to make multiple changes to an eRoom object automatically. Calling the method StartTransaction on an object begins the transaction and returns a Transaction object. Subsequent changes to the original object are not committed until you call Commit on the Transaction object. You can also call Rollback on the Transaction object to abandon the changes you've made during the transaction.

Each Transaction object is associated with the object that created it, and only controls changes made to that object. You cannot manage changes to multiple objects with a single Transaction object.

If a Transaction object is released before its Commit method has been called, it will automatically rollback the transaction and refresh the state of the controlled object.

Transactions may be nested by calling StartTransaction again on the same object, before committing or rolling back any pending transactions. When transactions are nested, the changes to the controlled object are not committed unless and until all the transactions are committed. In v4.0, the support for nested rollbacks is limited, such that if an inner transaction is rolled back, the outermost transaction will always be rolled back also, when it is committed.

If a transaction is rolled back, the object's state is refreshed. This state may or may not be the same as the pre-transaction state, since the object could have been modified by another thread or process in the meantime.

Transactions can also be used as an optimization technique, because changes to an object's state can be accumulated and sent to the server in a single request when the transaction is committed. In the absence of a transaction, a request is sent to the server each time the object's state is modified.

Home

Object

Transaction


Properties

None 

Methods

Commit

Rollback