tibasMetaspace_BeginTransaction()

Starts a transaction for the current thread.

Declaration

tibas_status tibasMetaspace_BeginTransaction
(tibasMetaspace   metaspace)

Parameters

Parameter Description
metaspace The TIBCO ActiveSpaces entity on which the function is invoked.

Remarks

Use the tibasMetaspace_BeginTransaction() function to begin a transaction for the current thread initiated by your application. Transactions are useful in the ActiveSpaces environment because space operations typically involve multiple tuples or affect multiple spaces.

After you begin the transaction, ActiveSpaces queues all space operations in the current thread in the transaction until you call either the tibasMetaspace_CommitTransaction() function to commit the transaction or the tibasMetaspace_RollbackTransaction() function to roll back the transaction. At that point, the transaction is ended.

If none of the transactions failed, your application should call tibasMetaspace_CommitTransaction(). If one or more operations failed, call tibasMetaspace_RollbackTransaction() to roll back the transaction.

Before you call tibasMetaSpace_BeginTransaction(), start a thread using a C language BeginThread function or a similar method.

You can also release the operations that have been added to the transaction for later acquisition by another application thread by calling the tibasMetaspace_ReleaseContext() function and then calling the tibasMetaspace_AcquireContext() function transfer the operations to a another thread.