public interface Transaction
Modifier and Type | Method and Description |
---|---|
void |
attachCurrentThread()
Attaches the current thread to this Transaction.
|
void |
commit()
Makes all changes made since the previous commit/rollback permanent and
releases any transaction domain locks currently affected by this
Transaction object. |
void |
detachCurrentThread()
Detaches the current thread from this Transaction.
|
void |
rollback()
Undoes all changes made in the current transaction and releases any
transaction domain locks currently affected by this
Transaction object. |
void commit() throws TransactionException
Transaction
object.TransactionException
- if an exception is thrown by the underlying
transaction aware object (e.g. an SqlException is thrown)void rollback() throws TransactionException
Transaction
object.TransactionException
- if an exception is thrown by the underlying
transaction aware object (e.g. an SqlException is thrown)void attachCurrentThread()
After this call, data operations executed by the current thread will be issued within this transaction's scope.
NB: Not all databases support transaction operations carried out by by a plurality of threads.
IllegalStateException
- if the current thread is already associated
with another Transaction within any transaction domain.void detachCurrentThread()
After this call, data operations executed by the current thread will be issued separated from this transaction's scope.
Copyright © 2019 Speedment, Inc.. All rights reserved.