Class MCRTransactionHelper

java.lang.Object
org.mycore.common.MCRTransactionHelper

public class MCRTransactionHelper extends Object
  • Constructor Details

    • MCRTransactionHelper

      public MCRTransactionHelper()
  • Method Details

    • isDatabaseAccessEnabled

      public static boolean isDatabaseAccessEnabled()
    • commitTransaction

      public static void commitTransaction()
      commits the database transaction. Commit is only done if isTransactionActive() returns true.
    • rollbackTransaction

      public static void rollbackTransaction()
      forces the database transaction to roll back. Roll back is only performed if isTransactionActive() returns true.
    • isTransactionActive

      public static boolean isTransactionActive()
      Is the transaction still alive?
      Returns:
      true if the transaction is still alive
    • transactionRequiresRollback

      public static boolean transactionRequiresRollback()
      Determine whether the current resource transaction has been marked for rollback.
      Returns:
      boolean indicating whether the transaction has been marked for rollback
    • beginTransaction

      public static void beginTransaction()
      starts a new database transaction.