Class CMTTxInterceptor

  • All Implemented Interfaces:
    org.jboss.invocation.Interceptor
    Direct Known Subclasses:
    LifecycleCMTTxInterceptor, TimerCMTTxInterceptor

    public class CMTTxInterceptor
    extends Object
    implements org.jboss.invocation.Interceptor
    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 Detail

      • FACTORY

        public static final org.jboss.invocation.InterceptorFactory FACTORY
    • Constructor Detail

      • CMTTxInterceptor

        public CMTTxInterceptor()
    • Method Detail

      • endTransaction

        protected void endTransaction​(jakarta.transaction.Transaction tx)
        The endTransaction method ends a transaction and translates any exceptions into TransactionRolledBack[Local]Exception or SystemException.
        Parameters:
        tx - a Transaction value
      • processInvocation

        public Object processInvocation​(org.jboss.invocation.InterceptorContext invocation)
                                 throws Exception
        Specified by:
        processInvocation in interface org.jboss.invocation.Interceptor
        Throws:
        Exception
      • invokeInCallerTx

        protected Object invokeInCallerTx​(org.jboss.invocation.InterceptorContext invocation,
                                          jakarta.transaction.Transaction tx,
                                          EJBComponent component)
                                   throws Exception
        Throws:
        Exception
      • ourTxRolledBack

        protected void ourTxRolledBack()
      • setRollbackOnly

        protected void setRollbackOnly​(jakarta.transaction.Transaction tx,
                                       Throwable t)
        The setRollbackOnly method calls setRollbackOnly() on the invocation's transaction and logs any exceptions than may occur.
        Parameters:
        tx - the transaction
        t - the exception to add problems to (may be null)