Transaction implementation based on transaction management through a JDBC java.sql.Connection .
This the Hibernate's default transaction strategy.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private final JDBCContext | |
| private static final Logger | |
| private boolean | |
| private final SynchronizationRegistry | |
| private int | |
| private boolean | |
| private final TransactionFactory. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| public void | commit()
Implements org. FlushMode#MANUAL.
|
| private void | |
| public boolean | |
| private void | |
| private void | |
| public void | registerSynchronization(Synchronization
The Synchronization callback to register. sync)Implements org. |
| public void | rollback()
Implements org. |
| private void | |
| public void | setTimeout(int
The number of seconds before a timeout. seconds)Implements org. |
| private void | |
| public boolean | wasCommitted()
Implements org. |
| public boolean | wasRolledBack()
Implements org. |
| begun | back to summary |
|---|---|
| private boolean begun | |
| callback | back to summary |
|---|---|
| private boolean callback | |
| commitFailed | back to summary |
|---|---|
| private boolean commitFailed | |
| committed | back to summary |
|---|---|
| private boolean committed | |
| jdbcContext | back to summary |
|---|---|
| private final JDBCContext jdbcContext | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| rolledBack | back to summary |
|---|---|
| private boolean rolledBack | |
| synchronizationRegistry | back to summary |
|---|---|
| private final SynchronizationRegistry synchronizationRegistry | |
| timeout | back to summary |
|---|---|
| private int timeout | |
| toggleAutoCommit | back to summary |
|---|---|
| private boolean toggleAutoCommit | |
| transactionContext | back to summary |
|---|---|
| private final TransactionFactory. | |
| JDBCTransaction | back to summary |
|---|---|
| public JDBCTransaction(JDBCContext jdbcContext, TransactionFactory. | |
| begin | back to summary |
|---|---|
| public void begin() throws HibernateException Implements org. Doc from org. Begin a new transaction. | |
| closeIfRequired | back to summary |
|---|---|
| private void closeIfRequired() throws HibernateException | |
| commit | back to summary |
|---|---|
| public void commit() throws HibernateException Implements org. Doc from org. Flush the associated Session and end the unit of work (unless
we are in | |
| commitAndResetAutoCommit | back to summary |
|---|---|
| private void commitAndResetAutoCommit() throws SQLException | |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements org. Doc from org. Is this transaction still active? Again, this only returns information in relation to the local transaction, not the actual underlying transaction.
| |
| notifySynchronizationsAfterTransactionCompletion | back to summary |
|---|---|
| private void notifySynchronizationsAfterTransactionCompletion(int status) | |
| notifySynchronizationsBeforeTransactionCompletion | back to summary |
|---|---|
| private void notifySynchronizationsBeforeTransactionCompletion() | |
| registerSynchronization | back to summary |
|---|---|
| public void registerSynchronization(Synchronization sync) Implements org. Doc from org. Register a user synchronization callback for this transaction.
| |
| rollback | back to summary |
|---|---|
| public void rollback() throws HibernateException Implements org. Doc from org. Force the underlying transaction to roll back. | |
| rollbackAndResetAutoCommit | back to summary |
|---|---|
| private void rollbackAndResetAutoCommit() throws SQLException | |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(int seconds) Implements org. Doc from org. Set the transaction timeout for any transaction started by a subsequent call to begin() on this instance.
| |
| toggleAutoCommit | back to summary |
|---|---|
| private void toggleAutoCommit() | |
| wasCommitted | back to summary |
|---|---|
| public boolean wasCommitted() Implements org. Doc from org. Check if this transaction was successfully committed.
This method could return false even after successful invocation
of
| |
| wasRolledBack | back to summary |
|---|---|
| public boolean wasRolledBack() Implements org. Doc from org. 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.
| |