Transaction implementation based on transaction management through
a JTA UserTransaction. Similar to CMTTransaction, except
here we are actually managing the transactions through the Hibernate
transaction mechanism.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private final JDBCContext | |
| private static final Logger | |
| private boolean | |
| private static final int | |
| private final TransactionFactory. | |
| private UserTransaction |
| Access | Constructor and Description |
|---|---|
| public | JTATransaction(UserTransaction userTransaction, JDBCContext jdbcContext, TransactionFactory.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| private void | |
| public void | commit()
Implements org. FlushMode#MANUAL.
|
| private TransactionManager | Returns: Value for property 'transactionManager'.Getter for property 'transactionManager'. |
| protected UserTransaction | Returns: Value for property 'userTransaction'.Getter for property 'userTransaction'. |
| public boolean | |
| public void | registerSynchronization(Synchronization
The Synchronization callback to register. sync)Implements org. |
| public void | rollback()
Implements org. |
| public void | setTimeout(int
The number of seconds before a timeout. seconds)Implements org. |
| 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 | |
| commitSucceeded | back to summary |
|---|---|
| private boolean commitSucceeded | |
| jdbcContext | back to summary |
|---|---|
| private final JDBCContext jdbcContext | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| newTransaction | back to summary |
|---|---|
| private boolean newTransaction | |
| NULL | back to summary |
|---|---|
| private static final int NULL | |
| transactionContext | back to summary |
|---|---|
| private final TransactionFactory. | |
| userTransaction | back to summary |
|---|---|
| private UserTransaction userTransaction | |
| JTATransaction | back to summary |
|---|---|
| public JTATransaction(UserTransaction userTransaction, JDBCContext jdbcContext, TransactionFactory. | |
| afterCommitRollback | back to summary |
|---|---|
| private void afterCommitRollback() throws TransactionException | |
| 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 | |
| getTransactionManager | back to summary |
|---|---|
| private TransactionManager getTransactionManager() Getter for property 'transactionManager'.
| |
| getUserTransaction | back to summary |
|---|---|
| protected UserTransaction getUserTransaction() Getter for property 'userTransaction'.
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() throws TransactionException 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.
| |
| registerSynchronization | back to summary |
|---|---|
| public void registerSynchronization(Synchronization sync) throws HibernateException 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. | |
| 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.
| |
| wasCommitted | back to summary |
|---|---|
| public boolean wasCommitted() throws TransactionException 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() throws TransactionException 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.
| |