Class TransactionCallbackUtil

java.lang.Object
com.liferay.portal.kernel.transaction.TransactionCallbackUtil

public class TransactionCallbackUtil extends Object
Registers callbacks against the current transaction's lifecycle. Commit callbacks run after the transaction commits, rollback callbacks run after it rolls back, and completion callbacks run after either outcome, ordered after the outcome specific callbacks. The listener recognizes savepoint backed nested propagation scopes and keeps their callbacks in savepoint frames: a scope that commits promotes its callbacks to the enclosing scope, while a scope that rolls back runs its rollback and completion callbacks and discards its commit callbacks.
Author:
Shuyang Zhou
  • Field Details

  • Constructor Details

    • TransactionCallbackUtil

      public TransactionCallbackUtil()
  • Method Details

    • registerCommitCallback

      public static void registerCommitCallback(Callable<?> callable)
    • registerCompletionCallback

      public static void registerCompletionCallback(Callable<?> callable)
    • registerRollbackCallback

      public static void registerRollbackCallback(Callable<?> callable)