Transactional annotation, corresponding to the
TransactionDefinition interface.
| Modifier and Type | Field and Description |
|---|---|
| public static final Propagation | MANDATORY
Support a current transaction, throw an exception if none exists. |
| public static final Propagation | NESTED
Execute within a nested transaction if a current transaction exists,
behave like |
| public static final Propagation | NEVER
Execute non-transactionally, throw an exception if a transaction exists. |
| public static final Propagation | NOT_SUPPORTED
Execute non-transactionally, suspend the current transaction if one exists. |
| public static final Propagation | REQUIRED
Support a current transaction, create a new one if none exists. |
| public static final Propagation | REQUIRES_NEW
Create a new transaction, and suspend the current transaction if one exists. |
| public static final Propagation | SUPPORTS
Support a current transaction, execute non-transactionally if none exists. |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public static Propagation | |
| public static Propagation[] |
| MANDATORY | back to summary |
|---|---|
| public static final Propagation MANDATORY Support a current transaction, throw an exception if none exists. Analogous to EJB transaction attribute of the same name. | |
| NESTED | back to summary |
|---|---|
| public static final Propagation NESTED Execute within a nested transaction if a current transaction exists,
behave like Note Actual creation of a nested transaction will only work on specific transaction managers. Out of the box, this only applies to the JDBC DataSourceTransactionManager. Some JTA providers might support nested transactions as well. | |
| NEVER | back to summary |
|---|---|
| public static final Propagation NEVER Execute non-transactionally, throw an exception if a transaction exists. Analogous to EJB transaction attribute of the same name. | |
| NOT_SUPPORTED | back to summary |
|---|---|
| public static final Propagation NOT_SUPPORTED Execute non-transactionally, suspend the current transaction if one exists. Analogous to EJB transaction attribute of the same name. Note Actual transaction suspension will not work out-of-the-box
on all transaction managers. This in particular applies to
| |
| REQUIRED | back to summary |
|---|---|
| public static final Propagation REQUIRED Support a current transaction, create a new one if none exists. Analogous to EJB transaction attribute of the same name. This is the default setting of a transaction annotation. | |
| REQUIRES_NEW | back to summary |
|---|---|
| public static final Propagation REQUIRES_NEW Create a new transaction, and suspend the current transaction if one exists. Analogous to the EJB transaction attribute of the same name. Note Actual transaction suspension will not work out-of-the-box
on all transaction managers. This in particular applies to
| |
| SUPPORTS | back to summary |
|---|---|
| public static final Propagation SUPPORTS Support a current transaction, execute non-transactionally if none exists. Analogous to EJB transaction attribute of the same name. Note For transaction managers with transaction synchronization,
| |
| value | back to summary |
|---|---|
| private final int value | |
| Propagation | back to summary |
|---|---|
| private Propagation(int value) | |
| value | back to summary |
|---|---|
| public int value() | |
| valueOf | back to summary |
|---|---|
| public static Propagation valueOf(String name) | |
| values | back to summary |
|---|---|
| public static Propagation[] values() | |