Transactions may only span threads if they do so serially; that is, each transaction must be active in only a single thread of control at a time.
This restriction holds for parents of nested transactions as well; no two children may be concurrently active in more than one thread of control at any one time.
Cursors may not span transactions; that is, each cursor must be opened and closed within a single transaction.
A parent transaction may not issue any Berkeley DB operations -- except for {@link com.sleepycat.db.Environment#beginTransaction Environment.beginTransaction}, {@link com.sleepycat.db.Transaction#abort Transaction.abort} and {@link com.sleepycat.db.Transaction#commit Transaction.commit} --while it has active child transactions (child transactions that have not yet been committed or aborted).
@param parent If the parent parameter 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 parameter to {@link com.sleepycat.db.Transaction#prepare Transaction.prepare}.
@param config The transaction attributes. If null, default attributes are used.
@return The newly created transaction's handle.
@throws DatabaseException if a failure occurs.
|
|
|
|
|
|
|
|
|
|