This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.0.26! |
<tx:advice/> Settings
This section summarizes the various transactional settings that you can specify by using
the <tx:advice/>
tag. The default <tx:advice/>
settings are:
-
The propagation setting is
REQUIRED.
-
The isolation level is
DEFAULT.
-
The transaction is read-write.
-
The transaction timeout defaults to the default timeout of the underlying transaction system or none if timeouts are not supported.
-
Any
RuntimeException
triggers rollback, and any checkedException
does not.
You can change these default settings. The following table summarizes the various attributes of the <tx:method/>
tags
that are nested within <tx:advice/>
and <tx:attributes/>
tags:
Attribute | Required? | Default | Description |
---|---|---|---|
|
Yes |
Method names with which the transaction attributes are to be associated. The
wildcard (*) character can be used to associate the same transaction attribute
settings with a number of methods (for example, |
|
|
No |
|
Transaction propagation behavior. |
|
No |
|
Transaction isolation level. Only applicable to propagation settings of |
|
No |
-1 |
Transaction timeout (seconds). Only applicable to propagation |
|
No |
false |
Read-write versus read-only transaction. Applies only to |
|
No |
Comma-delimited list of |
|
|
No |
Comma-delimited list of |