1<!--$Id: txn_class.so,v 10.25 2005/05/17 15:25:50 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: DB_TXN</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>
13<b>DB_TXN</b>
14</td>
15<td align=right>
16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24typedef struct __db_txn DB_TXN;
25</pre></b>
26<hr size=1 noshade>
27<b>Description: DB_TXN</b>
28<p>The DB_TXN object is the handle for a transaction.  Methods of
29the DB_TXN handle are used to configure, abort and commit the
30transaction.  DB_TXN handles are provided to <a href="../api_c/db_class.html">DB</a> methods
31in order to transactionally protect those database operations.</p>
32<p>DB_TXN handles are not free-threaded; transactions handles may
33be used by multiple threads, but only serially, that is, the application
34must serialize access to the DB_TXN handle.  Once the
35<a href="../api_c/txn_abort.html">DB_TXN-&gt;abort</a> or <a href="../api_c/txn_commit.html">DB_TXN-&gt;commit</a> methods are called, the handle may
36not be accessed again, regardless of the method's return. In addition,
37parent transactions may not issue any Berkeley DB operations while they have
38active child transactions (child transactions that have not yet been
39committed or aborted) except for <a href="../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>, <a href="../api_c/txn_abort.html">DB_TXN-&gt;abort</a>
40and <a href="../api_c/txn_commit.html">DB_TXN-&gt;commit</a>.</p>
41<hr size=1 noshade>
42<br><b>Class</b>
43<a href="../api_c/env_class.html">DB_ENV</a>, DB_TXN
44<br><b>See Also</b>
45<a href="../api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
46</tt>
47<table width="100%"><tr><td><br></td><td align=right>
48<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
49</td></tr></table>
50<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
51</body>
52</html>
53