Class TransactionUtil


  • public class TransactionUtil
    extends java.lang.Object
    Deprecated.
    Class containing transactions helper methods and interfaces.
    Author:
    Derek Hulley
    • Constructor Detail

      • TransactionUtil

        public TransactionUtil()
        Deprecated.
    • Method Detail

      • flush

        public static void flush()
        Deprecated.
        Flush transaction.
      • executeInUserTransaction

        public static <R> R executeInUserTransaction​(TransactionService transactionService,
                                                     TransactionUtil.TransactionWork<R> transactionWork)
        Deprecated.
        Execute the transaction work in a user transaction
        Parameters:
        transactionService - the transaction service
        transactionWork - the transaction work
        Throws:
        java.lang.RuntimeException - if the transaction was rolled back
      • executeInUserTransaction

        public static <R> R executeInUserTransaction​(TransactionService transactionService,
                                                     TransactionUtil.TransactionWork<R> transactionWork,
                                                     boolean readOnly)
        Deprecated.
        Execute the transaction work in a user transaction. Any current transaction will be continued.
        Parameters:
        transactionService - the transaction service
        transactionWork - the transaction work
        readOnly - true if the transaction should be read-only
        Throws:
        java.lang.RuntimeException - if the transaction was rolled back
      • executeInNonPropagatingUserTransaction

        public static <R> R executeInNonPropagatingUserTransaction​(TransactionService transactionService,
                                                                   TransactionUtil.TransactionWork<R> transactionWork)
        Deprecated.
        Execute the transaction work in a writable, non-propagating user transaction. Any current transaction will be suspended a new one started.
        Parameters:
        transactionService - the transaction service
        transactionWork - the transaction work
        Throws:
        java.lang.RuntimeException - if the transaction was rolled back
      • executeInNonPropagatingUserTransaction

        public static <R> R executeInNonPropagatingUserTransaction​(TransactionService transactionService,
                                                                   TransactionUtil.TransactionWork<R> transactionWork,
                                                                   boolean readOnly)
        Deprecated.
        Execute the transaction work in a non-propagating user transaction. Any current transaction will be suspended a new one started.
        Parameters:
        transactionService - the transaction service
        transactionWork - the transaction work
        readOnly - true if the transaction should be read-only
        Throws:
        java.lang.RuntimeException - if the transaction was rolled back