Class TransactionalInterceptorBase
java.lang.Object
com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TransactionalInterceptorMandatory
,TransactionalInterceptorNever
,TransactionalInterceptorNotSupported
,TransactionalInterceptorRequired
,TransactionalInterceptorRequiresNew
,TransactionalInterceptorSupports
- Author:
- paul.robinson@redhat.com 02/05/2013, Laird Nelson
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransactionalInterceptorBase
(boolean userTransactionAvailable) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
doIntercept
(jakarta.transaction.TransactionManager tm, jakarta.transaction.Transaction tx, jakarta.interceptor.InvocationContext ic) protected void
handleException
(jakarta.interceptor.InvocationContext ic, Throwable t, jakarta.transaction.Transaction tx) The handleException considers the transaction to be marked for rollback only in case the thrown exception comes with this effect (seeTransactionHandler.handleExceptionNoThrow(Transactional, Throwable, Transaction)
and consider theTransactional.dontRollbackOn()
.intercept
(jakarta.interceptor.InvocationContext ic) protected Object
invokeInCallerTx
(jakarta.interceptor.InvocationContext ic, jakarta.transaction.Transaction tx) protected Object
invokeInNoTx
(jakarta.interceptor.InvocationContext ic) protected Object
invokeInOurTx
(jakarta.interceptor.InvocationContext ic, jakarta.transaction.TransactionManager tm) protected Object
invokeInOurTx
(jakarta.interceptor.InvocationContext ic, jakarta.transaction.TransactionManager tm, RunnableWithException afterEndTransaction) protected void
resetUserTransactionAvailability
(boolean previousUserTransactionAvailability) protected boolean
setUserTransactionAvailable
(boolean available)
-
Constructor Details
-
TransactionalInterceptorBase
protected TransactionalInterceptorBase(boolean userTransactionAvailable)
-
-
Method Details
-
intercept
- Throws:
Exception
-
doIntercept
protected abstract Object doIntercept(jakarta.transaction.TransactionManager tm, jakarta.transaction.Transaction tx, jakarta.interceptor.InvocationContext ic) throws Exception - Throws:
Exception
-
invokeInOurTx
protected Object invokeInOurTx(jakarta.interceptor.InvocationContext ic, jakarta.transaction.TransactionManager tm) throws Exception - Throws:
Exception
-
invokeInOurTx
protected Object invokeInOurTx(jakarta.interceptor.InvocationContext ic, jakarta.transaction.TransactionManager tm, RunnableWithException afterEndTransaction) throws Exception - Throws:
Exception
-
invokeInCallerTx
protected Object invokeInCallerTx(jakarta.interceptor.InvocationContext ic, jakarta.transaction.Transaction tx) throws Exception - Throws:
Exception
-
invokeInNoTx
- Throws:
Exception
-
handleException
protected void handleException(jakarta.interceptor.InvocationContext ic, Throwable t, jakarta.transaction.Transaction tx) throws Exception The handleException considers the transaction to be marked for rollback only in case the thrown exception comes with this effect (seeTransactionHandler.handleExceptionNoThrow(Transactional, Throwable, Transaction)
and consider theTransactional.dontRollbackOn()
. If so then this method rethrows theThrowable
passed as the parameter 't'.- Throws:
Exception
-
setUserTransactionAvailable
protected boolean setUserTransactionAvailable(boolean available) -
resetUserTransactionAvailability
protected void resetUserTransactionAvailability(boolean previousUserTransactionAvailability)
-