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()
Transaction
Transaction.commit()
or Transaction.rollback()
will error.begin
in interface Transaction
public void commit()
Transaction
FlushMode.MANUAL
FlushMode.
commit
in interface Transaction
public void rollback()
Transaction
rollback
in interface Transaction
public TransactionStatus getStatus()
Transaction
getStatus
in interface Transaction
public void registerSynchronization(Synchronization synchronization) throws HibernateException
Transaction
registerSynchronization
in interface Transaction
synchronization
- The Synchronization callback to register.HibernateException
- Indicates a problem registering the synchronization.public void setTimeout(int seconds)
Transaction
Transaction.begin()
on this instance.setTimeout
in interface Transaction
seconds
- The number of seconds before a timeout.public int getTimeout()
Transaction
getTimeout
in interface Transaction
public void markRollbackOnly()
Transaction
markRollbackOnly
in interface Transaction
public void invalidate()
protected boolean allowFailedCommitToPhysicallyRollback()
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.