Package io.quarkus.narayana.jta.runtime
Annotation Interface TransactionConfiguration
This annotation can be used to configure a different transaction timeout than the default one for a method or a class.
When defined on a method, it needs to be used on the entry method of the transaction.
If defined on a class, it is equivalent to defining it on all the methods of the class marked with @Transactional
.
The configuration defined on a method takes precedence over the configuration defined on a class.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionint
The transaction timeout in seconds.The configuration property to use in order to determine the value of the timeout in seconds. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
This value is used to specify that no transaction timeout is configured.static final String
-
Field Details
-
UNSET_TIMEOUT
static final int UNSET_TIMEOUTThis value is used to specify that no transaction timeout is configured.- See Also:
-
UNSET_TIMEOUT_CONFIG_PROPERTY
- See Also:
-
-
Element Details
-
timeout
int timeoutThe transaction timeout in seconds. Defaults to UNSET_TIMEOUT: no timeout configured.- Returns:
- The transaction timeout in seconds.
- Default:
- -1
-
timeoutFromConfigProperty
String timeoutFromConfigPropertyThe configuration property to use in order to determine the value of the timeout in seconds. If the property exists, it must be an integer value representing the transaction timeout in seconds. An example configuration inapplication.properties
could be:my-transaction.timeout=5
. If bothtimeoutFromConfigProperty
andtimeout
are set, then Quarkus will attempt to resolvetimeoutFromConfigProperty
and if a value for it has been provided, the timeout is set to that value. If no value has been provided at runtime for the property, then the value oftimeout
will be used as the fallback.- Default:
- "<<unset>>"
-