xa_open()--Open an XA Resource Manager (Transaction Scoped Locks)


  Syntax

 #include <xa.h>

 int xa_switch.xa_open_entry(char *xa_info,     
     int rmid, long flags);

  Default Public Authority: *USE

  Service Program: QTNXADTP

  Threadsafe: Yes

A transaction manager calls xa_open() to open the XA resource manager and to prepare it for use in the XA distributed transaction environment. This function must be called before any other resource manager (xa_) calls are made.


Parameters

*xa_info
(Input) A pointer to a null-terminated string that contains information used to initialize the resource manager. See the Usage Notes for details on what this string should contain.

rmid
(Input) A number generated by the transaction manager to identify this instance of the XA resource manager. This resource manager identifier is passed to the other XA functions to identify which instance of the resource manager for which the function is called.

flags
(Input) The following are valid settings of flags.

TMNOFLAGS: 0x00000000L Perform the open operation normally.


Authorities

None


Return Value



Error Messages

The following messages may be sent from this function.



Usage Notes

xainfo String Keywords and Values



Related Information



Example

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <xa.h>

main() {

  char xa_info[1024]=
       "tmname=mytranmgr rdbname=myrdb";

  int  rmid;
  long flags;
  int  retcode;
  extern struct xa_switch_t xa_switch;

  retcode =
     xa_switch.xa_open_entry(xa_info, rmid, flags);
}


API introduced: V5R2

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