BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo C Function Reference

tpresume(3c)

Name

tpresume() - resume a global transaction

Synopsis

#include <atmi.h>
int tpresume(TPTRANID *tranid, long flags)

Description

tpresume() is used to resume work on behalf of a previously suspended transaction. Once the caller resumes work on a transaction, it must either suspend it with tpsuspend(), or complete it with one of tpcommit() or tpabort() at a later time.

The caller must ensure that its linked resource managers have been opened (via tpopen()) before it can resume work on any transaction.

tpresume() places the caller in transaction mode on behalf of the global transaction identifier pointed to by tranid. It is an error for tranid to be NULL.

Currently, flags are reserved for future use and must be set to 0.

In a multithreaded application, a thread in the TPINVALIDCONTEXT state is not allowed to issue a call to tpresume().

Return Value

tpresume() returns -1 on error and sets tperrno() to indicate the error condition.

Errors

Under the following conditions, tpresume() fails and sets tperrno() to:

[TPEINVAL]

Either tranid is a NULL pointer, it points to a non-existent transaction identifier (including previously completed or timed-out transactions), or it points to a transaction identifier that the caller is not allowed to resume. The caller's state with respect to the transaction is not changed.

[TPEMATCH]

tranid points to a transaction identifier that another process has already resumed. The caller's state with respect to the transaction is not changed.

[TPETRAN]

The BEA Tuxedo system is unable to resume the global transaction because the caller is currently participating in work outside any global transaction with one or more resource managers. All such work must be completed before a global transaction can be resumed. The caller's state with respect to the local transaction is unchanged.

[TPEPROTO]

tpresume() was called in an improper context (for example, the caller is already in transaction mode). The caller's state with respect to the transaction is not changed.

[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.

Notes

XA-compliant resource managers must be successfully opened to be included in the global transaction. (See tpopen(3c) for details.)

A process resuming a suspended transaction must reside on the same logical machine (LMID) as the process that suspended the transaction. For a workstation client, the workstation handler (WSH) to which it is connected must reside on the same logical machine as the handler for the workstation client that suspended the transaction.

See Also

tpabort(3c), tpcommit(3c), tpopen(3c), tpsuspend(3c)