Class TransactionalInterceptorBase

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TransactionalInterceptorBase​(boolean userTransactionAvailable)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.Object doIntercept​(javax.transaction.TransactionManager tm, javax.transaction.Transaction tx, javax.interceptor.InvocationContext ic)  
      protected void handleException​(javax.interceptor.InvocationContext ic, java.lang.Throwable t, javax.transaction.Transaction tx)
      The handleException considers the transaction to be marked for rollback only in case the thrown exception comes with this effect (see TransactionHandler.handleExceptionNoThrow(Transactional, Throwable, Transaction) and consider the Transactional.dontRollbackOn().
      java.lang.Object intercept​(javax.interceptor.InvocationContext ic)  
      protected java.lang.Object invokeInCallerTx​(javax.interceptor.InvocationContext ic, javax.transaction.Transaction tx)  
      protected java.lang.Object invokeInNoTx​(javax.interceptor.InvocationContext ic)  
      protected java.lang.Object invokeInOurTx​(javax.interceptor.InvocationContext ic, javax.transaction.TransactionManager tm)  
      protected java.lang.Object invokeInOurTx​(javax.interceptor.InvocationContext ic, javax.transaction.TransactionManager tm, RunnableWithException afterEndTransaction)  
      protected void resetUserTransactionAvailability​(boolean previousUserTransactionAvailability)  
      protected boolean setUserTransactionAvailable​(boolean available)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TransactionalInterceptorBase

        protected TransactionalInterceptorBase​(boolean userTransactionAvailable)
    • Method Detail

      • intercept

        public java.lang.Object intercept​(javax.interceptor.InvocationContext ic)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • doIntercept

        protected abstract java.lang.Object doIntercept​(javax.transaction.TransactionManager tm,
                                                        javax.transaction.Transaction tx,
                                                        javax.interceptor.InvocationContext ic)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • invokeInOurTx

        protected java.lang.Object invokeInOurTx​(javax.interceptor.InvocationContext ic,
                                                 javax.transaction.TransactionManager tm)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • invokeInOurTx

        protected java.lang.Object invokeInOurTx​(javax.interceptor.InvocationContext ic,
                                                 javax.transaction.TransactionManager tm,
                                                 RunnableWithException afterEndTransaction)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • invokeInCallerTx

        protected java.lang.Object invokeInCallerTx​(javax.interceptor.InvocationContext ic,
                                                    javax.transaction.Transaction tx)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • invokeInNoTx

        protected java.lang.Object invokeInNoTx​(javax.interceptor.InvocationContext ic)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleException

        protected void handleException​(javax.interceptor.InvocationContext ic,
                                       java.lang.Throwable t,
                                       javax.transaction.Transaction tx)
                                throws java.lang.Exception
        The handleException considers the transaction to be marked for rollback only in case the thrown exception comes with this effect (see TransactionHandler.handleExceptionNoThrow(Transactional, Throwable, Transaction) and consider the Transactional.dontRollbackOn(). If so then this method rethrows the Throwable passed as the parameter 't'.
        Throws:
        java.lang.Exception
      • setUserTransactionAvailable

        protected boolean setUserTransactionAvailable​(boolean available)
      • resetUserTransactionAvailability

        protected void resetUserTransactionAvailability​(boolean previousUserTransactionAvailability)