Suspends the EAServer transaction associated with the calling thread.
CORBACurrent objects
CORBACurrent.SuspendTransaction ( )
Argument |
Description |
---|---|
CORBACurrent |
Reference to the CORBACurrent service instance |
Unsigned long. Returns a handle that refers to the transaction associated with the thread or 0 if an error occurs.
The SuspendTransaction function returns a handle referring to the transaction associated with the calling thread. This handle can be passed to the ResumeTransaction function on the same or a different thread. When SuspendTransaction is called, the current thread is no longer associated with a transaction.
SuspendTransaction can be called by a client or a component that is marked as OTS style. must be using the two-phase commit transaction coordinator (OTS/XA).
This example shows the use of the SuspendTransaction function to disassociate the calling thread from the current transaction:
// Instance variable: // CORBACurrent corbcurr integer li_rc unsignedlong ll_handle // Get and initialize an instance of CORBACurrent ... li_rc = corbcurr.BeginTransaction() // do some transactional work ll_handle = corbcurr.SuspendTransaction() // do some nontransactional work li_rc = corbcurr.ResumeTransaction(ll_handle) // do some more transactional work li_rc = corbcurr.CommitTransaction()