124 lines
3.6 KiB
HTML
124 lines
3.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>xa_start_2()--Start an XA Transaction</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- UNIX11 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2DCIJB at -->
|
|
<!-- RCHVMW2 on 1 Jun 1999 at 16:14:12 -->
|
|
<!-- Edited by Kersten Feb 02 -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<a name="Top_Of_Page"></a>
|
|
|
|
<h2>xa_start_2()--Start an XA Transaction Branch, Extended Version (Transaction Scoped Locks)</h2>
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
Syntax<br>
|
|
<pre>
|
|
#include <xa.h>
|
|
|
|
int xa_switch.xa_start_2_entry(XID <em>*xid</em>,
|
|
int <em>rmid</em>, XACTL <em>*ctl</em>, long <em>flags</em>);
|
|
</pre>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Service Program: QTNXADTP<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>A transaction manager calls <strong>xa_start_2()</strong> to inform a
|
|
resource manager that an application may do work on behalf of a transaction
|
|
branch. The calling thread becomes associated with the transaction branch.</p>
|
|
|
|
<p>For additional information about parameters, authorities required, return
|
|
values, and error conditions, see the <a href="dxatlstr.htm">xa_start()</a>
|
|
API.</p>
|
|
|
|
<p>The xa_start_2() function is the same as the xa_start() function, with one
|
|
additional parameter, <em>ctl</em>.</p>
|
|
|
|
<dl>
|
|
<dt><strong>*ctl</strong></dt>
|
|
|
|
<dd>(Input) A pointer to the following structure.
|
|
|
|
<pre>
|
|
struct xactl_t {
|
|
long flags; /* valid element flags */
|
|
TRANSACTION_TIMEOUT timeout; /* timeout value */
|
|
};
|
|
</pre>
|
|
|
|
<p>Following are the valid settings of <em>ctl->flags</em>.</p>
|
|
|
|
<p><em>XAOPTS_TIMEOUT:</em> 0x00000001L Timeout value is present.</p>
|
|
|
|
<p><em>XAOPTS_NOFLAGS:</em> 0x00000000L To be used when no optional values
|
|
are set.</p>
|
|
|
|
<p><em>ctl->timeout</em> is the number of seconds before which the
|
|
resource manager can timeout and rollback the transaction. Type
|
|
TRANSACTION_TIMEOUT is declared in header file <em>xa.h</em>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Example</h3>
|
|
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
|
|
for information pertaining to code examples.</p>
|
|
<pre>
|
|
#include <xa.h>
|
|
|
|
main() {
|
|
XID *xid;
|
|
int rmid;
|
|
XACTL ctl;
|
|
long flags;
|
|
int retcode;
|
|
extern struct xa_switch_t xa_switch;
|
|
|
|
retcode =
|
|
xa_switch.xa_start_2_entry(xid, rmid, &ctl, flags);
|
|
}
|
|
</pre>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V5R2
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a> </td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|