Class BeginOptions


  • public class BeginOptions
    extends Object
    Builder interface to allow a transaction to be customized, including things like timeout and semantics when an existing transaction is present.
    • Field Detail

      • commitOnRequestScopeEnd

        boolean commitOnRequestScopeEnd
      • timeout

        int timeout
    • Constructor Detail

      • BeginOptions

        public BeginOptions()
    • Method Detail

      • commitOnRequestScopeEnd

        public BeginOptions commitOnRequestScopeEnd()
        If this method is called the transaction will be automatically committed when the request scope is destroyed, instead of being rolled back.

        Returns:
        These options
      • timeout

        public BeginOptions timeout​(int seconds)
        Sets the transaction timeout for transactions created by this builder. A value of zero refers to the system default.
        Parameters:
        seconds - The timeout in seconds
        Returns:
        This builder
        Throws:
        IllegalArgumentException - If seconds is negative