Package io.quarkus.narayana.jta.runtime
Annotation Type TransactionConfiguration
-
@Inherited @Target({METHOD,TYPE}) @Retention(RUNTIME) public @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.
-
-
Field Summary
Fields Modifier and Type Fields Description static int
UNSET_TIMEOUT
This value is used to specify that no transaction timeout is configured.static String
UNSET_TIMEOUT_CONFIG_PROPERTY
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description int
timeout
The transaction timeout in seconds.String
timeoutFromConfigProperty
The configuration property to use in order to determine the value of the timeout in seconds.
-
-
-
-
UNSET_TIMEOUT_CONFIG_PROPERTY
static final String UNSET_TIMEOUT_CONFIG_PROPERTY
-
-
-
timeoutFromConfigProperty
String timeoutFromConfigProperty
The 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>>"
-
-