Package io.quarkus.narayana.jta
Class RunOptions
java.lang.Object
io.quarkus.narayana.jta.RunOptionsBase
io.quarkus.narayana.jta.RunOptions
Deprecated.
Builder interface to allow a transaction to be customized, including things like timeout and semantics when an existing
transaction is present.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.static enumDeprecated.Enum that can be used to control the transaction behaviour in the presence or absence of an existing transaction. -
Field Summary
Fields inherited from class io.quarkus.narayana.jta.RunOptionsBase
exceptionHandler, semantics, timeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Provides an exception handler that can make a decision to rollback or commit based on the type of exception.semantic(RunOptions.Semantic semantic) Deprecated.Sets the transaction semantics that is used to determine the action to take if a transaction is already active.timeout(int seconds) Deprecated.Sets the transaction timeout for transactions created by this builder.Methods inherited from class io.quarkus.narayana.jta.RunOptionsBase
setExceptionHandler, setSemantics, setTimeout
-
Constructor Details
-
RunOptions
public RunOptions()Deprecated.
-
-
Method Details
-
timeout
Deprecated.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
-
semantic
Deprecated.Sets the transaction semantics that is used to determine the action to take if a transaction is already active.- Parameters:
semantic- The semantic- Returns:
- This builder
-
exceptionHandler
Deprecated.Provides an exception handler that can make a decision to rollback or commit based on the type of exception. If the predicate returnsRunOptions.ExceptionResult.ROLLBACKthe transaction is rolled back, otherwise it is committed.This exception will still be propagated to the caller, so this method should not log or perform any other actions other than determine what should happen to the current transaction.
By default, the exception is always rolled back.
- Parameters:
handler- The exception handler- Returns:
- This builder
-
QuarkusTransaction.requiringNew(),QuarkusTransaction.joiningExisting(),QuarkusTransaction.disallowingExisting(),QuarkusTransaction.suspendingExisting()orQuarkusTransaction.runner(TransactionSemantics)instead.