This behavior may be set for a database environment using the {@link com.sleepycat.db.EnvironmentConfig#setTxnWriteNoSync EnvironmentConfig.setTxnWriteNoSync} method or for a singletransaction using the {@link com.sleepycat.db.Environment#beginTransaction Environment.beginTransaction} method.Any value specified to this method overrides both of those settings.
In the case of nested transactions, if the transaction is a parent transaction, committing the parent transaction causes all unresolved children of the parent to be committed. In the case of nested transactions, if the transaction is a child transaction, its locks are not released, but are acquired by its parent. Although the commit of the child transaction will succeed, the actual resolution of the child transaction is postponed until the parent transaction is committed or aborted; that is, if its parent transaction commits, it will be committed; and if its parent transaction aborts, it will be aborted.
All cursors opened within the transaction must be closed before the transaction is committed.
After this method returns the {@link com.sleepycat.db.Transaction Transaction} handle may not beaccessed again, regardless of the method's success or failure. If the method encounters an error, the transaction and all child transactions of the transaction will have been aborted when the call returns.
@throws DatabaseException if a failure occurs.
This behavior is the default for database environments unless otherwise configured using the {@link com.sleepycat.je.EnvironmentConfig#setTxnNoSync EnvironmentConfig.setTxnNoSync} method. This behavior may also be setfor a single transaction using the {@link com.sleepycat.je.Environment#beginTransaction Environment.beginTransaction} method. Any value specified to thismethod overrides both of those settings.
All cursors opened within the transaction must be closed before the transaction is committed.
If the method encounters an error, the transaction will have been aborted when the call returns.
After this method has been called, regardless of its return, the {@link Transaction} handle may not be accessed again, with oneexception: the {@code abort} method may be called any number of timesto simplify error handling.
@throws com.sleepycat.je.rep.InsufficientReplicasException if the masterin a replicated environment could not contact enough replicas to initiate the commit. @throws com.sleepycat.je.rep.InsufficientAcksException if the master ina replicated environment did not receive enough replica acknowledgments, althought the commit succeeded locally. @throws com.sleepycat.je.rep.ReplicaWriteException if a write operationwas performed with this transaction, but this node is now a Replica. @throws OperationFailureException if this exception occurred earlier andcaused the transaction to be invalidated. @throws EnvironmentFailureException if an unexpected, internal orenvironment-wide failure occurs. @throws IllegalStateException if the transaction or environment has beenclosed, or cursors associated with the transaction are still open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|