Debian Codegraph @

docs/programmer_reference/xa_faq.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>XA: Frequently Asked Questions</title>
7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10 <link rel="up" href="xa.html" title="Chapter 13.  Distributed Transactions" />
11 <link rel="prev" href="xa_xa_restrict.html" title="Restrictions on XA Transactions" />
12 <link rel="next" href="apprec.html" title="Chapter 14.  Application Specific Logging and Recovery" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">XA: Frequently Asked Questions</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="xa_xa_restrict.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 13. 
26 Distributed Transactions
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="apprec.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="xa_faq"></a>XA: Frequently Asked Questions</h2>
38 </div>
39 </div>
40 </div>
41 <div class="orderedlist">
42 <ol type="1">
43 <li>
44 <span class="bold">
45 <strong>Is it possible to mix XA and non-XA transactions?</strong>
46 </span>
47 <p>Yes. It is also possible for XA and non-XA transactions to coexist in
48 the same Berkeley DB environment. To do this, specify the same environment
49 to the non-XA <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a> calls as was specified in the Tuxedo
50 configuration file.</p>
51 </li>
52 <li>
53 <span class="bold">
54 <strong>Does converting an application to run within XA change any of
55 the already existing C/C++ API calls it does?</strong>
56 </span>
57 <p>When converting an application to run under XA, the application's Berkeley DB calls are unchanged, with three exceptions:</p>
58 <div class="orderedlist">
59 <ol type="a">
60 <li>The application must specify the <a href="../api_reference/C/dbcreate.html#dbcreate_DB_XA_CREATE" class="olink">DB_XA_CREATE</a> flag to
61 the <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a> function.</li>
62 <li>Unless the application is performing an operation for a non-XA transaction, the application should never explicitly call <a href="../api_reference/C/txncommit.html" class="olink">DB_TXN-&gt;commit()</a>, <a href="../api_reference/C/txnabort.html" class="olink">DB_TXN-&gt;abort()</a>, and <a href="../api_reference/C/txnbegin.html" class="olink">DB_ENV-&gt;txn_begin()</a>, and those calls should be replaced by calls into the Tuxedo transaction manager.</li>
63 <li>Unless the application is performing an operation for a non-XA transaction, the application should specify a transaction argument of NULL to Berkeley DB methods taking transaction arguments (for example, <a href="../api_reference/C/dbput.html" class="olink">DB-&gt;put()</a> or <a href="../api_reference/C/dbcursor.html" class="olink">DB-&gt;cursor()</a>).</li>
64 </ol>
65 </div>
66 <p>Otherwise, the application should be unchanged.</p>
67 </li>
68 <li>
69 <span class="bold">
70 <strong>How does Berkeley DB recovery interact with recovery by the Tuxedo
71 transaction manager?</strong>
72 </span>
73 <p>Recovery is completed in two steps. First, each resource manager should
74 recover its environment(s). This can be done via a program that calls
75 <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a> or by calling the <a href="../api_reference/C/db_recover.html" class="olink">db_recover</a> utility. If using the <a href="../api_reference/C/db_recover.html" class="olink">db_recover</a> utility, then the option
76 should be specified so that the regions that are recovered persist after
77 the utility exits. Any transactions that were prepared, but neither
78 completed nor aborted, are restored to their prepared state so that they
79 may be aborted or committed via the Tuxedo recovery mechanisms. After
80 each resource manager has recovered, then Tuxedo recovery may begin.
81 Tuxedo will interact with each resource manager via the __db_xa_recover
82 function which returns the list of prepared, but not yet completed
83 transactions. It should issue a commit or abort for each one, and only
84 after having completed each transaction will normal processing resume.</p>
85 <p>Finally, standard log file archival and catastrophic recovery procedures
86 should occur independently of XA operation.</p>
87 </li>
88 <li>
89 <span class="bold">
90 <strong>Does Berkeley DB provide multi-threaded support for XA transactions?</strong>
91 </span>
92 <p>
93 Yes.
94 For information on how to build multi-threaded servers for XA transactions,
95 see <a class="ulink" href="http://download.oracle.com/docs/cd/E13161_01/tuxedo/docs10gr3/pgc/pgthr.html" target="_top">http://download.oracle.com/docs/cd/E13161_01/tuxedo/docs10gr3/pgc/pgthr.html</a>.
96 All databases used by servers should be opened with handles created with the <a href="../api_reference/C/dbcreate.html#dbcreate_DB_XA_CREATE" class="olink">DB_XA_CREATE</a> flag in the <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a> method and must be opened in the tpsvrinit routine.
97 Note that the environment parameter of the <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a> method must be assigned NULL.
98 For more information on the tpsvrinit routine, see <a class="ulink" href="http://download.oracle.com/docs/cd/E13161_01/tuxedo/docs10gr3/pgc/pgthr.html" target="_top">http://download.oracle.com/docs/cd/E13161_01/tuxedo/docs10gr3/pgc/pgthr.html</a>.
99
100 </p>
101 </li>
102 </ol>
103 </div>
104 </div>
105 <div class="navfooter">
106 <hr />
107 <table width="100%" summary="Navigation footer">
108 <tr>
109 <td width="40%" align="left"><a accesskey="p" href="xa_xa_restrict.html">Prev</a> </td>
110 <td width="20%" align="center">
111 <a accesskey="u" href="xa.html">Up</a>
112 </td>
113 <td width="40%" align="right"> <a accesskey="n" href="apprec.html">Next</a></td>
114 </tr>
115 <tr>
116 <td width="40%" align="left" valign="top">Restrictions on XA Transactions </td>
117 <td width="20%" align="center">
118 <a accesskey="h" href="index.html">Home</a>
119 </td>
120 <td width="40%" align="right" valign="top"> Chapter 14. 
121 Application Specific Logging and Recovery
122 </td>
123 </tr>
124 </table>
125 </div>
126 </body>
127 </html>