Interface CommitListener


public interface CommitListener
Event listener that will be called before/after a transaction commit. Can be registered through PersistenceSession.addCommitListener(CommitListener)
  • Field Details

  • Method Details

    • onBeforeCommit

      default void onBeforeCommit(TransactionControl transaction)
    • onAfterFlush

      default boolean onAfterFlush(TransactionControl transaction)
      Called after EntityTransactionContext.executeEntityOperations() and Session.flush() has been called. This means that all INSERT and UPDATE statements have already been executed, but the transaction is not committed yet.
      Returns:
      true if the session should be flushed after this listener (e.g. if this listener modifies the database)
    • onAfterCommit

      default void onAfterCommit()
    • priority

      default int priority()
      Defines the ordering of commit listeners, lower numbers will be executed first