站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

TransactionAttributeEditor (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.transaction.interceptor
Class TransactionAttributeEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.springframework.transaction.interceptor.TransactionAttributeEditor
All Implemented Interfaces:
PropertyEditor

public class TransactionAttributeEditor
extends PropertyEditorSupport

PropertyEditor for TransactionAttribute objects. Accepts a String of form

PROPAGATION_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.

Since:
24.04.2003
Author:
Rod Johnson, Juergen Hoeller
See Also:
TransactionDefinition, Constants

Constructor Summary
TransactionAttributeEditor()
           
 
Method Summary
 void setAsText(String text)
          Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionAttributeEditor

public TransactionAttributeEditor()
Method Detail

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.

Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException
See Also:
PropertyEditor.setAsText(java.lang.String)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.