head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.54.02; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.11; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.00; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.08.12; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.59; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
DbEnv.txn_begin |
![]() ![]() |
import com.sleepycat.db.*;public DbTxn txn_begin(DbTxn parent, int flags) throws DbException;
The DbEnv.txn_begin method creates a new transaction in the environment and returns a DbTxn that uniquely identifies it.
If the parent argument is non-null, the new transaction will be a nested transaction, with the transaction indicated by parent as its parent. Transactions may be nested to any level. In the presence of distributed transactions and two-phase commit, only the parental transaction, that is a transaction without a parent specified, should be passed as an argument to DbTxn.prepare.
The flags value must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
This behavior may be set for a Berkeley DB environment using the DbEnv.set_flags interface. Any value specified in this interface overrides that setting.
This behavior is the default for Berkeley DB environments unless the Db.DB_TXN_NOSYNC flag was specified to the DbEnv.set_flags interface. Any value specified in this interface overrides that setting.
Note: A transaction may not span threads; that is, each transaction must begin and end in the same thread, and each transaction may be used only by a single thread.
Note: Cursors may not span transactions; that is, each cursor must be opened and closed within a single transaction.
Note: A parent transaction may not issue any Berkeley DB operations -- except for DbEnv.txn_begin, DbTxn.abort and DbTxn.commit -- while it has active child transactions (child transactions that have not yet been committed or aborted).
The DbEnv.txn_begin method throws an exception that encapsulates a non-zero error value on failure.
The DbEnv.txn_begin method may fail and throw an exception encapsulating a non-zero error for the following conditions:
The DbEnv.txn_begin method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods. If a catastrophic error has occurred, the DbEnv.txn_begin method may fail and throw a DbRunRecoveryException, in which case all subsequent Berkeley DB calls will fail in the same way.
![]() ![]() |
Copyright Sleepycat Software
@
1.1
log
@Initial revision
@
text
@d1 1
a1 1
@
1.1.1.1
log
@Import: RPM 4.0.3
@
text
@@
1.1.1.2
log
@Import: RPM 4.0.4
@
text
@d1 1
a1 1
d17 1
a17 1
d25 1
a25 1
throws DbException;
a29 3
Calling the DbTxn.abort,
DbTxn.commit or DbTxn.discard methods will discard the returned
handle.
d59 1
a59 1
Db.DB_TXN_NOSYNC flag was specified to the DbEnv.set_flags
a95 1
DbTxn.set_timeout
d100 1
a100 1
@
1.1.1.3
log
@Import: RPM 4.0.5
@
text
@d1 2
a2 2
a3 1
d56 2
a57 3
of this transaction,
throw a DbLockNotGrantedException
immediately instead of blocking on the lock.
d83 3
a85 3
If a catastrophic error has occurred, the DbEnv.txn_begin method may fail and
throw a DbRunRecoveryException,
in which case all subsequent Berkeley DB calls will fail in the same way.
d87 1
a87 1
DbEnv, DbTxn
d89 13
a101 1
Transaction Subsystem and Related Methods
@
1.1.1.4
log
@Import: RPM 4.1
@
text
@d1 2
a2 2
d4 1
d57 3
a59 2
of this transaction, return immediately instead of blocking on the lock.
The error return in the case will be Db.DB_LOCK_NOTGRANTED.
d85 3
a87 3
If a catastrophic error has occurred, the DbEnv.txn_begin method may fail and throw
a DbRunRecoveryException, in which case all subsequent Berkeley DB calls
will fail in the same way.
d89 1
a89 1
DbEnv, DbTxn
d91 1
a91 13
DbEnv.set_tx_max,
DbEnv.set_tx_timestamp,
DbTxn.abort,
DbEnv.txn_begin,
DbEnv.txn_checkpoint,
DbTxn.commit,
DbTxn.discard,
DbTxn.id,
DbTxn.prepare,
DbEnv.txn_recover,
DbTxn.set_timeout
and
DbEnv.txn_stat.
@
1.1.1.5
log
@Import: RPM 4.1.1
@
text
@d1 2
a2 2
a3 1
d56 2
a57 3
of this transaction,
throw a DbLockNotGrantedException
immediately instead of blocking on the lock.
d83 3
a85 3
If a catastrophic error has occurred, the DbEnv.txn_begin method may fail and
throw a DbRunRecoveryException,
in which case all subsequent Berkeley DB calls will fail in the same way.
d87 1
a87 1
DbEnv, DbTxn
d89 13
a101 1
Transaction Subsystem and Related Methods
@