Package org.jboss.as.ejb3.tx
Class CMTTxInterceptor
java.lang.Object
org.jboss.as.ejb3.tx.CMTTxInterceptor
- All Implemented Interfaces:
org.jboss.invocation.Interceptor
- Direct Known Subclasses:
LifecycleCMTTxInterceptor,TimerCMTTxInterceptor
NOTE: References in this file to Enterprise JavaBeans (EJB) refer to the Jakarta Enterprise Beans unless otherwise noted.
Ensure the correct exceptions are thrown based on both caller
transactional context and supported Transaction Attribute Type
EJB3 13.6.2.6
EJB3 Core Specification 14.3.1 Table 14
- Author:
- ALR, Carlo de Wolf, Scott Marlow
-
Field Summary
FieldsFields inherited from interface org.jboss.invocation.Interceptor
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidendTransaction(jakarta.transaction.Transaction tx) TheendTransactionmethod ends a transaction and translates any exceptions into TransactionRolledBack[Local]Exception or SystemException.protected ObjectinvokeInCallerTx(org.jboss.invocation.InterceptorContext invocation, jakarta.transaction.Transaction tx, EJBComponent component) protected ObjectinvokeInImportedTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected ObjectinvokeInNoTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected ObjectinvokeInOurTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected Objectmandatory(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected Objectnever(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected ObjectnotSupported(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) protected voidprocessInvocation(org.jboss.invocation.InterceptorContext invocation) protected Objectrequired(org.jboss.invocation.InterceptorContext invocation, EJBComponent component, int timeout) protected ObjectrequiresNew(org.jboss.invocation.InterceptorContext invocation, EJBComponent component, int timeout) protected voidsetRollbackOnly(jakarta.transaction.Transaction tx, Throwable t) ThesetRollbackOnlymethod calls setRollbackOnly() on the invocation's transaction and logs any exceptions than may occur.protected Objectsupports(org.jboss.invocation.InterceptorContext invocation, EJBComponent component)
-
Field Details
-
FACTORY
public static final org.jboss.invocation.InterceptorFactory FACTORY
-
-
Constructor Details
-
CMTTxInterceptor
public CMTTxInterceptor()
-
-
Method Details
-
endTransaction
protected void endTransaction(jakarta.transaction.Transaction tx) TheendTransactionmethod ends a transaction and translates any exceptions into TransactionRolledBack[Local]Exception or SystemException.- Parameters:
tx- aTransactionvalue
-
processInvocation
public Object processInvocation(org.jboss.invocation.InterceptorContext invocation) throws Exception - Specified by:
processInvocationin interfaceorg.jboss.invocation.Interceptor- Throws:
Exception
-
invokeInImportedTx
protected Object invokeInImportedTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
invokeInCallerTx
protected Object invokeInCallerTx(org.jboss.invocation.InterceptorContext invocation, jakarta.transaction.Transaction tx, EJBComponent component) throws Exception - Throws:
Exception
-
invokeInNoTx
protected Object invokeInNoTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
invokeInOurTx
protected Object invokeInOurTx(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
ourTxRolledBack
protected void ourTxRolledBack() -
mandatory
protected Object mandatory(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
never
protected Object never(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
notSupported
protected Object notSupported(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-
required
protected Object required(org.jboss.invocation.InterceptorContext invocation, EJBComponent component, int timeout) throws Exception - Throws:
Exception
-
requiresNew
protected Object requiresNew(org.jboss.invocation.InterceptorContext invocation, EJBComponent component, int timeout) throws Exception - Throws:
Exception
-
setRollbackOnly
ThesetRollbackOnlymethod calls setRollbackOnly() on the invocation's transaction and logs any exceptions than may occur.- Parameters:
tx- the transactiont- the exception to add problems to (may benull)
-
supports
protected Object supports(org.jboss.invocation.InterceptorContext invocation, EJBComponent component) throws Exception - Throws:
Exception
-