public class TransactionImpl extends Object implements Transaction
| Constructor and Description |
|---|
TransactionImpl(TransactionCoordinator transactionCoordinator) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowFailedCommitToPhysicallyRollback() |
void |
begin()
Begin this transaction.
|
void |
commit()
Commit this transaction.
|
TransactionStatus |
getStatus()
Get the current local status of this transaction.
|
int |
getTimeout()
Retrieve the transaction timeout set for this transaction.
|
void |
invalidate() |
void |
markRollbackOnly()
Make a best effort to mark the underlying transaction for rollback only.
|
void |
registerSynchronization(Synchronization synchronization)
Register a user synchronization callback for this transaction.
|
void |
rollback()
Rollback this transaction.
|
void |
setTimeout(int seconds)
Set the transaction timeout for any transaction started by a subsequent call to
Transaction.begin() on this instance. |
public TransactionImpl(TransactionCoordinator transactionCoordinator)
public void begin()
TransactionTransaction.commit() or Transaction.rollback() will error.begin in interface Transactionpublic void commit()
TransactionFlushMode.MANUAL FlushMode.
commit in interface Transactionpublic void rollback()
Transactionrollback in interface Transactionpublic TransactionStatus getStatus()
TransactiongetStatus in interface Transactionpublic void registerSynchronization(Synchronization synchronization) throws HibernateException
TransactionregisterSynchronization in interface Transactionsynchronization - The Synchronization callback to register.HibernateException - Indicates a problem registering the synchronization.public void setTimeout(int seconds)
TransactionTransaction.begin() on this instance.setTimeout in interface Transactionseconds - The number of seconds before a timeout.public int getTimeout()
TransactiongetTimeout in interface Transactionpublic void markRollbackOnly()
TransactionmarkRollbackOnly in interface Transactionpublic void invalidate()
protected boolean allowFailedCommitToPhysicallyRollback()
Copyright © 2016 JBoss by Red Hat. All rights reserved.