#include <xa.h> int ax_reg(int rmid, XID *xid, long flags);
The XA resource manager calls ax_reg() to inform a transaction manager that it is about to do work on behalf of an application in a thread of control. The transaction manager needs to tell the resource manager whether or not that work should be performed on behalf of a transaction branch. If the work is part of a transaction branch, the transaction manager will return the transaction branch identifier in *xid. If the work is not part of a transaction branch, the transaction manager will return the NULLXID in *xid.
The XA resource manager indicates that it uses dynamic registration by setting the TMREGISTER value in the flags element of its xa_switch_t structure.
The name of the service program that contains ax_reg() and ax_unreg() must be provided to the XA resource manager in the *xa_info parameter of the db2xa_open() call.
None
-3 | [TMER_PROTO]
ax_reg() was not successful. Function was called in an improper context. |
-2 | [TMER_INVAL]
ax_reg() was not successful. Incorrect arguments were specified. |
-1 | [TMER_TMERR]
ax_reg() was not successful. The transaction manager detected an error when registering the resource. |
0 | [TM_OK]
ax_reg() was successful. |
1 | [TM_RESUME]
The resource manager should resume work on a previously suspended transaction branch. If the resource manager does not recognize the *xid, it will return a failure indication to the application. |
2 | [TM_JOIN]
The resource manager is joining the work of an existing transaction branch. If the resource manager does not recognize the *xid, it will return a failure indication to the application. |
Top | UNIX-Type APIs | APIs by category |