Interface TransactionalAction

All Known Implementing Classes:
AnnotationType.RemoveInheritedAnnotationsAction, DerivedBioAssay.FixDerivedBioAssayParentsRecursivelyAction, DropDynamicTableAction, ItemList.DelayedAdditionManager, MeasuredBioMaterial.RemainingQuantityAction, ProjectSpecificAnnotationsManager, RelatedItemHelper.CloseMyDbControl, ServiceSessionControl.FlushSessionAction

public interface TransactionalAction
Interface that define hooks for callbacks during transaction commit and rollback. It is not allowed to use the DbControl that the action is part of in any of the callback methods.
Since:
3.1
Author:
Nicklas
Last modified
$Date: 2011-11-16 15:39:47 +0100 (on, 16 nov 2011) $
  • Method Summary

    Modifier and Type Method Description
    void onAfterCommit()
    Called after a successful commit.
    void onBeforeCommit()
    This method is called before the commit is about to happen.
    void onRollback()
    Called after an unsuccessful commit.
  • Method Details

    • onBeforeCommit

      void onBeforeCommit()
      This method is called before the commit is about to happen. If this method throws an exception the transaction will be rolled back.
    • onAfterCommit

      void onAfterCommit()
      Called after a successful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.
    • onRollback

      void onRollback()
      Called after an unsuccessful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.