Class ActionNonTxAware<R,​A,​E extends Exception>


  • public abstract class ActionNonTxAware<R,​A,​E extends Exception>
    extends Object
    This class describes all the actions that are not supposed to be called within a transaction
    Version:
    $Id$
    Author:
    Nicolas Filotto
    • Field Detail

      • LOG

        protected static final org.exoplatform.services.log.Log LOG
        The logger
    • Constructor Detail

      • ActionNonTxAware

        public ActionNonTxAware()
    • Method Detail

      • run

        public R run​(A... arg)
              throws E extends Exception
        Executes the action outside the context of the current tx
        Parameters:
        arg - the argument to use to execute the action
        Returns:
        the result of the action
        Throws:
        E - if an error occurs while executing the action
        E extends Exception
      • run

        public R run()
              throws E extends Exception
        Executes the action outside the context of the current tx. This method is equivalent to run(Object[])} but with null as parameter.
        Returns:
        the result of the action
        Throws:
        E - if an error occurs while executing the action
        E extends Exception
      • execute

        protected R execute​(A... arg)
                     throws E extends Exception
        Executes the action
        Parameters:
        arg - the argument to use to execute the action
        Returns:
        the result of the action
        Throws:
        E - if an error occurs while executing the action
        E extends Exception
      • execute

        protected R execute​(A arg)
                     throws E extends Exception
        Executes the action
        Parameters:
        arg - the argument to use to execute the action
        Returns:
        the result of the action
        Throws:
        E - if an error occurs while executing the action
        E extends Exception
      • getTransactionManager

        protected abstract TransactionManager getTransactionManager()
        Gives the Transaction Manager that will be used while executing the action
        Returns:
        the TransactionManager to use