java.lang.Object | |
↳ | org.hibernate.transaction.JDBCTransaction |
Transaction
implementation based on transaction management through a JDBC java.sql.Connection.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Begin a new transaction.
| |||||||||||
Flush the associated Session and end the unit of work (unless
we are in
MANUAL .
| |||||||||||
Is this transaction still active?
Again, this only returns information in relation to the
local transaction, not the actual underlying transaction.
| |||||||||||
Register a user synchronization callback for this transaction.
| |||||||||||
Force the underlying transaction to roll back.
| |||||||||||
Set the transaction timeout for any transaction started by
a subsequent call to begin() on this instance.
| |||||||||||
Check if this transaction was successfully committed.
| |||||||||||
Was this transaction rolled back or set to rollback only?
This only accounts for actions initiated from this local transaction.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.Transaction
|
Flush the associated Session and end the unit of work (unless
we are in MANUAL
.
HibernateException |
---|
Is this transaction still active?
Again, this only returns information in relation to the local transaction, not the actual underlying transaction.Register a user synchronization callback for this transaction.
sync | The Synchronization callback to register. |
---|
Set the transaction timeout for any transaction started by a subsequent call to begin() on this instance.
seconds | The number of seconds before a timeout. |
---|
Check if this transaction was successfully committed.
This method could return false even after successful invocation ofcommit()
. As an example, JTA based strategies no-op on
commit()
calls if they did not start the transaction; in that case,
they also report wasCommitted()
as false.
Was this transaction rolled back or set to rollback only?
This only accounts for actions initiated from this local transaction. If, for example, the underlying transaction is forced to rollback via some other means, this method still reports false because the rollback was not initiated from here.