Class BeginOptions

java.lang.Object
io.quarkus.narayana.jta.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 Details

    • commitOnRequestScopeEnd

      boolean commitOnRequestScopeEnd
    • timeout

      int timeout
  • Constructor Details

    • BeginOptions

      public BeginOptions()
  • Method Details

    • 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