DbTxn::discard API Ref

#include <db_cxx.h>

int DbTxn::discard(u_int32_t flags);


Description: DbTxn::discard

The DbTxn::discard method frees up all the per-process resources associated with the specified DbTxn handle, neither committing nor aborting the transaction. This call may be used only after calls to DbEnv::txn_recover when there are multiple global transaction managers recovering transactions in a single Berkeley DB environment. Any transactions returned by DbEnv::txn_recover that are not handled by the current global transaction manager should be discarded using DbTxn::discard.

The DbTxn::discard method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

After DbTxn::discard has been called, regardless of its return, the DbTxn handle may not be accessed again.

Parameters
flags

Errors

The DbTxn::discard method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


EINVAL


Class DbEnv, DbTxn
See Also Transaction Subsystem and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.