~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/ref/xa/faq.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.-->
 
4
<html>
 
5
<head>
 
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++">
 
9
</head>
 
10
<body bgcolor=white>
 
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>
 
15
</td></tr></table>
 
16
<p>
 
17
<h1 align=center>XA FAQ</h1>
 
18
<p><ol>
 
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:
 
23
<p><ul type=disc>
 
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-&gt;put</a> or <a href="../../api_c/db_cursor.html">DB-&gt;cursor</a>).
 
32
</ul>
 
33
<p>Otherwise, your application should be unchanged.
 
34
<hr size=1 noshade>
 
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-&gt;open</a> calls as was specified in the Tuxedo
 
39
configuration file.
 
40
<hr size=1 noshade>
 
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-&gt;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.
 
58
</ol>
 
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>
 
60
</td></tr></table>
 
61
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
62
</body>
 
63
</html>