#include <DbXml.hpp> XmlTransaction() XmlTransaction(const XmlTransaction &) XmlTransaction &operator = (const XmlTransaction &) ~XmlTransaction()
The XmlTransaction
class is the handle for a
transaction. It encapsulates a DB_TXN
handle. Methods of the
XmlTransaction
class are used to abort and
commit the transaction. XmlTransaction
handles are provided to
XmlContainer
,
XmlManager
, and other
objects that query and modify documents and containers in order to
transactionally protect those database operations.
XmlTransaction
objects are instantiated using
XmlManager::createTransaction.
XmlTransaction
handles are not free-threaded;
transactions handles may be used by multiple threads, but only
serially, that is, the application must serialize access to the
XmlTransaction
handle. Once the
XmlTransaction::abort or XmlTransaction::commit methods are
called, the handle may not be accessed again, regardless of the
method's return. In addition, parent transactions may not issue any
operations while they have active child transactions (child
transactions that have not yet been committed or aborted) except for
XmlTransaction::abort and XmlTransaction::commit.
If the object is used after a commit or abort, an exception is thrown with the exception code, TRANSACTION_ERROR.