TMF Application Programmer's Guide (G06.24+)

File System Procedures
HP NonStop TMF Application Programmer’s Guide522419-004
4-29
TMF_JOIN_
TMF_JOIN_
This procedure allows a process to participate in a transaction initiated by another
process without taking over as the ENDTRANSACTION caller. TMF_JOIN_ can be
called by more than one process in the same Expand node at the same time. The
BEGINTRANSACTION caller need not call TMF_SUSPEND_ before another process
calls TMF_JOIN_ and can participate in the transaction at the same time.
Joining a transaction means:
Making the transaction the current transaction.
The process calling TMF_JOIN_ is not allowed to call ENDTRANSACTION.
To relinquish control of a joined transaction, the calling process must issue a
TMF_SUSPEND_ call; otherwise, the process that initiated the transaction receives
error 730 when it tries to run ENDTRANSACTION.
TMF_JOIN_ has the same semantics as the implicit transaction propogation provided
by the file system and can provide the same function when file system propogation is
not appropriate to the application.
The transaction identifier passed to this procedure is the one returned by
TMF_GET_TX_ID_.
This procedure cannot be used for transactions that were begun on a different
EXPAND node.
A joined transaction uses one of the entries in the calling process’ TFILE. If the
process has not explicitly opened the TFILE, the joined transaction uses the one TFILE
entry that exists for all processes. If there are no available TFILE entries when the call
to TMF_JOIN_ is issued, the call is rejected with file system error 83 (too many
transactions).
If the calling process is the primary process of a process pair and the TFILE is being
checkpointed, the calling process should checkpoint the TFILE after calling
TMF_JOIN_ to modify the backup process’ TFILE accordingly.