1
<!--$Id: faq.so,v 10.17 2001/04/12 01:38:43 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB Reference Guide: XA FAQ</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a><a name="3"><!--meow--></a>
12
<table width="100%"><tr valign=top>
13
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Distributed Transactions</dl></h3></td>
14
<td align=right><a href="../../ref/xa/xa_config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/appsignals.html"><img src="../../images/next.gif" alt="Next"></a>
17
<h1 align=center>XA FAQ</h1>
19
<p><li><b>Does converting an application to run within XA change any of
20
the already existing C/C++ API calls it does?</b>
21
<p>When converting an application to run under XA, the application's Berkeley DB
22
calls are unchanged, with two exceptions:
24
<li>The application must specify the <a href="../../api_c/db_create.html#DB_XA_CREATE">DB_XA_CREATE</a> flag to
25
the <a href="../../api_c/db_create.html">db_create</a> interface.
26
<li>The application should never explicitly call <a href="../../api_c/txn_commit.html">txn_commit</a>,
27
<a href="../../api_c/txn_abort.html">txn_abort</a> or <a href="../../api_c/txn_begin.html">txn_begin</a>, as those calls are replaced by
28
calls into the Tuxedo transaction manager. For the same reason, the
29
application will always specify a transaction argument of NULL to the
30
Berkeley DB functions that take transaction arguments (for example,
31
<a href="../../api_c/db_put.html">DB->put</a> or <a href="../../api_c/db_cursor.html">DB->cursor</a>).
33
<p>Otherwise, your application should be unchanged.
35
<p><li><b>Is it possible to mix XA and non-XA transactions?</b>
36
<p>Yes. It is also possible for XA and non-XA transactions to coexist in
37
the same Berkeley DB environment. To do this, specify the same environment
38
to the non-XA <a href="../../api_c/env_open.html">DB_ENV->open</a> calls as was specified in the Tuxedo
41
<p><li><b>How does Berkeley DB recovery interact with recovery by the Tuxedo
42
transaction manager?</b>
43
<p>Recovery is completed in two steps. First, each resource manager should
44
recover its environment(s). This can be done via a program that calls
45
<a href="../../api_c/env_open.html">DB_ENV->open</a> or by calling the <a href="../../utility/db_recover.html">db_recover</a> utility. If
46
using the <a href="../../utility/db_recover.html">db_recover</a> utility, then the <b>-e</b> option
47
should be specified so that the regions that are recovered persist after
48
the utility exits. Any transactions that were prepared, but neither
49
completed nor aborted, are restored to their prepared state so that they
50
may be aborted or committed via the Tuxedo recovery mechanisms. After
51
each resource manager has recovered, then Tuxedo recovery may begin.
52
Tuxedo will interact with each resource manager via the __db_xa_recover
53
function which returns the list of prepared, but not yet completed
54
transactions. It should issue a commit or abort for each one, and only
55
after having completed each transaction will normal processing resume.
56
<p>Finally, standard log file archival and catastrophic recovery procedures
57
should occur independently of XA operation.
59
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/xa/xa_config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/appsignals.html"><img src="../../images/next.gif" alt="Next"></a>
61
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>