Interface TransactionHandle


@NoImplement @MinMuleVersion("4.4.0") public interface TransactionHandle
Allows to manipulate the transaction that was started and bound to an specific SourceCallbackContext
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Commits the transaction.
    boolean
     
    void
    If the actual transaction is marked as RollbackOnly, then rollbacks the transaction.
    void
    Rolls the transaction back.
  • Method Details

    • isTransacted

      boolean isTransacted()
      Returns:
      Whether a transaction has been attached to the owning SourceCallbackContext
    • commit

      void commit() throws org.mule.runtime.api.tx.TransactionException
      Commits the transaction. This method is idempotent and thread-safe. It will do nothing if this method or rollback() have already been invoked on this instance.
      Throws:
      org.mule.runtime.api.tx.TransactionException - if the transaction fails to commit
    • rollback

      void rollback() throws org.mule.runtime.api.tx.TransactionException
      Rolls the transaction back. This method is idempotent and thread-safe. It will do nothing if this method or commit() have already been invoked on this instance.
      Throws:
      org.mule.runtime.api.tx.TransactionException - if the transaction fails to roll back
    • resolve

      void resolve() throws org.mule.runtime.api.tx.TransactionException
      If the actual transaction is marked as RollbackOnly, then rollbacks the transaction. In other case, commit the transaction
      Throws:
      org.mule.runtime.api.tx.TransactionException