类 TransactionAttributeEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.transaction.interceptor.TransactionAttributeEditor
- 所有已实现的接口:
PropertyEditor
public class TransactionAttributeEditor extends PropertyEditorSupport
PropertyEditor forTransactionAttribute
objects. Accepts a String of formPROPAGATION_NAME, ISOLATION_NAME, readOnly, timeout_NNNN,+Exception1,-Exception2
where only propagation code is required. For example:
PROPAGATION_MANDATORY, ISOLATION_DEFAULT
The tokens can be in any order. Propagation and isolation codes must use the names of the constants in the TransactionDefinition class. Timeout values are in seconds. If no timeout is specified, the transaction manager will apply a default timeout specific to the particular transaction manager.
A "+" before an exception name substring indicates that transactions should commit even if this exception is thrown; a "-" that they should roll back.
- 从以下版本开始:
- 24.04.2003
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
TransactionDefinition
,Constants
构造器概要
构造器 构造器 说明 TransactionAttributeEditor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
setAsText(String text)
Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2.
构造器详细资料
TransactionAttributeEditor
public TransactionAttributeEditor()
方法详细资料
setAsText
public void setAsText(String text) throws IllegalArgumentException
Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2. Null or the empty string means that the method is non transactional.- 指定者:
setAsText
在接口中PropertyEditor
- 覆盖:
setAsText
在类中PropertyEditorSupport
- 抛出:
IllegalArgumentException