ax_unreg()--Exit Program to Dynamically Unregister an XA Resource Manager (Job Scoped Locks)


  Syntax
 #include <xa.h>

 int ax_unreg(int rmid, long flags);   

  Threadsafe: Conditional; see Usage Notes.

The XA resource manager calls ax_unreg() to inform a transaction manager that it has completed work on a local transaction. The local transaction was started after receiving a NULLXID from ax_reg().

The XA resource manager indicates that it uses the dynamic registration facility 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.

Parameters

rmid
(Input) The resource manager identifier that was generated by a transaction manager when the resource manager was opened.
flags
(Input) The flags argument must be set to this value. TMNOFLAGS: 0x00000000L No flags are defined for this function.

Authorities

None


Return Value

-3 [TMER_PROTO]

ax_unreg() was not successful. Function was called in an improper context.

-2 [TMER_INVAL]

ax_unreg() was not successful. Incorrect arguments were specified.

-1 [TMER_TMERR]

ax_unreg() was not successful. The transaction manager detected an error when unregistering the resource.

0 [TM_OK]

ax_unreg() was successful.



Usage Notes

  1. This function must be threadsafe if the transaction manager calls the XA APIs in a multithreaded job.

Related Information



Exit program introduced: V4R3

[ Back to top | UNIX-Type APIs | APIs by category ]