Class ActionNonTxAware<R,A,E extends Exception>

java.lang.Object
org.exoplatform.services.transaction.ActionNonTxAware<R,A,E>

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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.exoplatform.services.log.Log
    The logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected R
    execute(A arg)
    Executes the action
    protected R
    execute(A... arg)
    Executes the action
    protected abstract javax.transaction.TransactionManager
    Gives the Transaction Manager that will be used while executing the action
    run()
    Executes the action outside the context of the current tx.
    run(A... arg)
    Executes the action outside the context of the current tx

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

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

    • ActionNonTxAware

      public ActionNonTxAware()
  • Method Details

    • run

      public R run(A... arg) throws E
      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
    • run

      public R run() throws E
      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
    • execute

      protected R execute(A... arg) throws E
      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
    • execute

      protected R execute(A arg) throws E
      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
    • getTransactionManager

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