| org.springframework.transaction.annotation.Propagation
Field Summary | |
Enum Constant | MANDATORY Support a current transaction, throw an exception if none exists. | Enum Constant | NESTED Execute within a nested transaction if a current transaction exists,
behave like PROPAGATION_REQUIRED else. | Enum Constant | NEVER Execute non-transactionally, throw an exception if a transaction exists. | Enum Constant | 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 on out-of-the-box
on all transaction managers. | Enum Constant | REQUIRED Support a current transaction, create a new one if none exists. | Enum Constant | REQUIRES_NEW Create a new transaction, suspend the current transaction if one exists.
Analogous to EJB transaction attribute of the same name.
Note: Actual transaction suspension will not work on out-of-the-box
on all transaction managers. | Enum Constant | 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,
PROPAGATION_SUPPORTS is slightly different from no transaction at all,
as it defines a transaction scopp that synchronization will apply for.
As a consequence, the same resources (JDBC Connection, Hibernate Session, etc)
will be shared for the entire specified scope. |
Method Summary | |
public int | value() |
MANDATORY | Enum Constant MANDATORY(Code) | | Support a current transaction, throw an exception if none exists.
Analogous to EJB transaction attribute of the same name.
|
NESTED | Enum Constant NESTED(Code) | | Execute within a nested transaction if a current transaction exists,
behave like PROPAGATION_REQUIRED else. There is no analogous feature in EJB.
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 when working on a JDBC 3.0 driver.
Some JTA providers might support nested transactions as well.
See Also: org.springframework.jdbc.datasource.DataSourceTransactionManager |
NEVER | Enum Constant NEVER(Code) | | Execute non-transactionally, throw an exception if a transaction exists.
Analogous to EJB transaction attribute of the same name.
|
NOT_SUPPORTED | Enum Constant NOT_SUPPORTED(Code) | | 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 on out-of-the-box
on all transaction managers. This in particular applies to JtaTransactionManager,
which requires the javax.transaction.TransactionManager to be
made available it to it (which is server-specific in standard J2EE).
See Also: org.springframework.transaction.jta.JtaTransactionManager.setTransactionManager |
REQUIRED | Enum Constant REQUIRED(Code) | | 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 | Enum Constant REQUIRES_NEW(Code) | | Create a new transaction, suspend the current transaction if one exists.
Analogous to EJB transaction attribute of the same name.
Note: Actual transaction suspension will not work on out-of-the-box
on all transaction managers. This in particular applies to JtaTransactionManager,
which requires the javax.transaction.TransactionManager to be
made available it to it (which is server-specific in standard J2EE).
See Also: org.springframework.transaction.jta.JtaTransactionManager.setTransactionManager |
SUPPORTS | Enum Constant SUPPORTS(Code) | | 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,
PROPAGATION_SUPPORTS is slightly different from no transaction at all,
as it defines a transaction scopp that synchronization will apply for.
As a consequence, the same resources (JDBC Connection, Hibernate Session, etc)
will be shared for the entire specified scope. Note that this depends on
the actual synchronization configuration of the transaction manager.
See Also: org.springframework.transaction.support.AbstractPlatformTransactionManager.setTransactionSynchronization |
Propagation | Propagation(int value)(Code) | | |
|
|