1<!--$Id: txn_abort.so,v 10.39 2004/08/13 03:39:03 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: DbTxn::abort</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>DbTxn::abort</b>
14</td>
15<td align=right>
16<a href="../api_cxx/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_cxx.h&gt;
23<p>
24int
25DbTxn::abort();
26</pre></b>
27<hr size=1 noshade>
28<b>Description: DbTxn::abort</b>
29<p>The DbTxn::abort method causes an abnormal termination of the transaction.
30The log is played backward, and any necessary undo operations are done
31through the <b>tx_recover</b> function specified to
32<a href="../api_cxx/env_set_app_dispatch.html">DbEnv::set_app_dispatch</a>.  Before DbTxn::abort returns, any
33locks held by the transaction will have been released.</p>
34<p>In the case of nested transactions, aborting a parent transaction causes
35all children (unresolved or not) of the parent transaction to be aborted.</p>
36<p>All cursors opened within the transaction must be closed before the
37transaction is aborted.</p>
38<p>After DbTxn::abort has been called, regardless of its return, the
39<a href="../api_cxx/txn_class.html">DbTxn</a> handle may not be accessed again.</p>
40<p>The DbTxn::abort method
41either returns a non-zero error value
42or throws an exception that encapsulates a non-zero error value on
43failure, and returns 0 on success.
44</p>
45<hr size=1 noshade>
46<br><b>Class</b>
47<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
48<br><b>See Also</b>
49<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
50</tt>
51<table width="100%"><tr><td><br></td><td align=right>
52<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
53</td></tr></table>
54<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
55</body>
56</html>
57