Package io.quarkus.narayana.jta
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 Summary
Fields Modifier and Type Field Description (package private) booleancommitOnRequestScopeEnd(package private) inttimeout
-
Constructor Summary
Constructors Constructor Description BeginOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeginOptionscommitOnRequestScopeEnd()If this method is called the transaction will be automatically committed when the request scope is destroyed, instead of being rolled back.BeginOptionstimeout(int seconds)Sets the transaction timeout for transactions created by this builder.
-
-
-
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
-
-