Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


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:

[TPEINVAL]

flags is not equal to 0. The caller's transaction is not affected.

[TPEHEURISTIC]

Due to a heuristic decision, the work done on behalf of the transaction was partially committed and partially aborted.

[TPEHAZARD]

Due to some failure, the work done on behalf of the transaction could have been heuristically completed.

[TPEPROTO]

tpabort() was called improperly (for example, by a participant).

[TPESYSTEM]

A BEA Tuxedo system error has occurred. The exact nature of the error is written to a log file.

[TPEOS]

An operating system error has occurred.

Notices

When using tpbegin(), tpcommit(), and tpabort() to delineate a BEA Tuxedo ATMI 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)

 

Skip navigation bar  Back to Top Previous Next