|
|
tpabort(3c)
Name
tpabort() - routine for aborting current transaction
Synopsis
#include <atmi.h>
int tpabort(long flags)
Description
tpabort() signifies the abnormal end of a transaction. When this call returns, all changes made to resources during the transaction are undone. Like tpcommit(), this function can be called only by the initiator of a transaction. Participants (that is, service routines) can express their desire to have a transaction aborted by calling tpreturn() with TPFAIL.
If tpabort() is called while call descriptors exist for outstanding replies, then upon return from the function, the transaction is aborted and those descriptors associated with the caller's transaction are no longer valid. Call descriptors not associated with the caller's transaction remain valid.
For each open connection to a conversational server in transaction mode, tpabort() will send a TPEV_DISCONIMM event to the server, whether or not the server has control of a connection. Connections opened before tpbegin() or with the TPNOTRAN flag (that is, not in transaction mode) are not affected.
Currently, the sole argument to the tpabort()function, flags, is reserved for future use and should be set to 0.
In a multithreaded application, a thread in the TPINVALIDCONTEXT state is not allowed to issue a call to tpabort().
Return Values
Upon failure, tpabort() returns -1 and sets tperrno() to indicate the error condition.
Errors
Upon failure, tpabort() sets tperrno() to one of the following values.
Notices
When using tpbegin(), tpcommit(), and tpabort() to delineate a BEA Tuxedo system transaction, it is important to remember that only the work done by a resource manager that meets the XA interface (and is linked to the caller appropriately) has transactional properties. All other operations performed in a transaction are not affected by either tpcommit() or tpabort().
See Also
tpbegin(3c), tpcommit(3c), tpgetlev(3c)
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|