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.
|
|