1<!--$Id: txn.so,v 1.6 2003/10/18 19:16:20 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Release 4.0: txn_XXX</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td>
13<td align=right><a href="/upgrade.4.0/mp.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/env.html"><img src="/images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Release 4.0: txn_XXX</b></p>
16<p>The C API for the Berkeley DB Transaction subsystem was reworked in the 4.0
17release as follows:</p>
18<table border=1 align=center>
19<tr><th>Historic functional interface</th><th>Berkeley DB 4.X method</th></tr>
20<tr><td>txn_abort</td><td><a href="/api_c/txn_abort.html">DB_TXN-&gt;abort</a></td></tr>
21<tr><td>txn_begin</td><td><a href="/api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a></td></tr>
22<tr><td>txn_checkpoint</td><td><a href="/api_c/txn_checkpoint.html">DB_ENV-&gt;txn_checkpoint</a></td></tr>
23<tr><td>txn_commit</td><td><a href="/api_c/txn_commit.html">DB_TXN-&gt;commit</a></td></tr>
24<tr><td>txn_discard</td><td><a href="/api_c/txn_discard.html">DB_TXN-&gt;discard</a></td></tr>
25<tr><td>txn_id</td><td><a href="/api_c/txn_id.html">DB_TXN-&gt;id</a></td></tr>
26<tr><td>txn_prepare</td><td><a href="/api_c/txn_prepare.html">DB_TXN-&gt;prepare</a></td></tr>
27<tr><td>txn_recover</td><td><a href="/api_c/txn_recover.html">DB_ENV-&gt;txn_recover</a></td></tr>
28<tr><td>txn_stat</td><td><a href="/api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a></td></tr>
29</table>
30<p>Applications calling any of these functions should update their calls
31to use the enclosing <a href="/api_c/env_class.html">DB_ENV</a> or <a href="/api_c/txn_class.html">DB_TXN</a> handle's method
32(easily done as the first argument to the existing call is the correct
33handle to use).</p>
34<p>As a special case, since applications might potentially have many calls
35to the txn_abort, txn_begin and txn_commit functions, those functions
36continue to work unchanged in the Berkeley DB 4.0 release.</p>
37<p>In addition, the <a href="/api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a> call has been changed in the 4.0
38release to take a flags argument.  To leave their historic behavior
39unchanged, applications should add a final argument of 0 to any calls
40made to <a href="/api_c/txn_stat.html">DB_ENV-&gt;txn_stat</a>.</p>
41<table width="100%"><tr><td><br></td><td align=right><a href="/upgrade.4.0/mp.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/env.html"><img src="/images/next.gif" alt="Next"></a>
42</td></tr></table>
43<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
44</body>
45</html>
46