Interface Transactional
-
public interface Transactional
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbegin()The TransactionManager.begin method starts a global transaction and associates the transaction context with the calling thread.voidcommit()The TransactionManager.commit method completes the transaction currently associated with the calling thread.net.sf.jkniv.sqlegance.transaction.TransactionTypegeTransactionType()Type of transactions supported by the repositoryTransactionStatusgetStatus()voidrollback()The TransactionManager.rollback method rolls back the transaction associated with the current thread.
-
-
-
Method Detail
-
begin
void begin()
The TransactionManager.begin method starts a global transaction and associates the transaction context with the calling thread. If the TransactionManager implementation does not support nested transactions, the TransactionManager.begin method throws the NotSupportedException when the calling thread is already associated with a transaction. The TransactionManager.getTransaction method returns the Transaction object that represents the transaction context currently associated with the calling thread. This Transaction object can be used to perform various operations on the target transaction. Examples of Transaction object operations are resource enlistment and synchronization registration.- Throws:
TransactionException- TODO doc me when some error occurs
-
commit
void commit()
The TransactionManager.commit method completes the transaction currently associated with the calling thread. After the commit method returns, the calling thread is not associated with a transaction. If the commit method is called when the thread is not associated with any transaction context, the TransactionManager throws an exception. In some implementations, the commit operation is restricted to the transaction originator only. If the calling thread is not allowed to commit the transaction, the TransactionManager throws an exception.- Throws:
TransactionException- TODO doc me when some error occurs
-
rollback
void rollback()
The TransactionManager.rollback method rolls back the transaction associated with the current thread. After the rollback method completes, the thread is associated with no transaction.- Throws:
TransactionException- TODO doc me when some error occurs
-
getStatus
TransactionStatus getStatus()
-
geTransactionType
net.sf.jkniv.sqlegance.transaction.TransactionType geTransactionType()
Type of transactions supported by the repository- Returns:
- type of transaction
-
-