Managing Transactions

ostc_Session::beginTxn()

virtual void beginTxn() ;

You do not usually have to use this function, since transactions are started automatically by the Server. Use beginTxn() only to group two or more calls to doOperation() into the same transaction.

Starts a transaction for the execution of operations with ostc_Session::doOperation(). When you call this function, the router starts an isolated_update transaction on a Server such that both of the following hold:

If you do not use this function, operations are automatically executed in the appropriate type of transaction when you call ostc_Session::doOperation().

ostc_InvalidTxnType is thrown if no isolated_update Server is running.

ostc_NoNestedTxn is thrown if a transaction started with beginTxn() is already in progress on the client.

ostc_Session::commitTxn()

virtual void commitTxn() ;

Commits the current transaction. See also ostc_Session::beginTxn().

ostc_NoTxnInProgress is thrown if there is no current transaction.

ostc_Session::abortTxn()

virtual void abortTxn() ;

Aborts the current transaction. See also ostc_Session::beginTxn().

ostc_NoTxnInProgress is thrown if there is no current transaction.



[previous] [next]