public class TxBeanManaged extends JtaTransactionPolicy implements BeanTransactionPolicy
BeanTransactionPolicy.SuspendedTransaction
TransactionPolicy.TransactionSynchronization
logger, transactionManager, transactionType, txLogger
Constructor and Description |
---|
TxBeanManaged(TransactionManager transactionManager) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commits or rolls back this TransactionPolicy.
|
Transaction |
getCurrentTransaction() |
UserTransaction |
getUserTransaction()
Gets the UserTransaction the bean uses to manage the transaction.
|
boolean |
isClientTransaction()
Is this policy running in an inhreited transaction? Some
TransactionTypes, such as Required or Supported, use the caller's
transaction instead of starting a new transaction.
|
boolean |
isNewTransaction()
Is this a new transaction and not an inhreited transaction or no transaction? Some
TransactionTypes, such as Required or Supported, use the caller's
transaction instead of starting a new transaction.
|
void |
resumeUserTransaction(BeanTransactionPolicy.SuspendedTransaction suspendedTransaction)
Resumes the transaction contained in the suspended transaction token.
|
BeanTransactionPolicy.SuspendedTransaction |
suspendUserTransaction()
Syspends the bean managed transaction.
|
beginTransaction, completeTransaction, enlistResource, fireNonTransactionalCompletion, getResource, getTransaction, getTransactionType, isRollbackOnly, isTransactionActive, putResource, registerSynchronization, removeResource, resumeTransaction, rollbackTransaction, setRollbackOnly, setRollbackOnly, setRollbackOnly, suspendTransaction, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
enlistResource, getResource, getTransactionType, isRollbackOnly, isTransactionActive, putResource, registerSynchronization, removeResource, setRollbackOnly, setRollbackOnly
public TxBeanManaged(TransactionManager transactionManager) throws SystemException
SystemException
public boolean isNewTransaction()
TransactionPolicy
isNewTransaction
in interface TransactionPolicy
public boolean isClientTransaction()
TransactionPolicy
isClientTransaction
in interface TransactionPolicy
public Transaction getCurrentTransaction()
getCurrentTransaction
in class JtaTransactionPolicy
public UserTransaction getUserTransaction()
BeanTransactionPolicy
getUserTransaction
in interface BeanTransactionPolicy
public BeanTransactionPolicy.SuspendedTransaction suspendUserTransaction() throws SystemException
BeanTransactionPolicy
suspendUserTransaction
in interface BeanTransactionPolicy
SystemException
- if there was a problem suspending the
transactionpublic void resumeUserTransaction(BeanTransactionPolicy.SuspendedTransaction suspendedTransaction) throws SystemException
BeanTransactionPolicy
resumeUserTransaction
in interface BeanTransactionPolicy
suspendedTransaction
- the transaction to resume; not nullSystemException
- if there was a problem resuming the transactionpublic void commit() throws ApplicationException, SystemException
TransactionPolicy
commit
in interface TransactionPolicy
ApplicationException
- if recoverable exception is encounteredSystemException
- if an unrecoverable exception is encountered