org.springframework.transaction.interceptor
Class TransactionAttributeEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--org.springframework.transaction.interceptor.TransactionAttributeEditor

public class TransactionAttributeEditor
extends PropertyEditorSupport

PropertyEditor for TransactionAttribute objects. Takes Strings of form

PROPAGATION_NAME,ISOLATION_NAME,readOnly,+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.

A "+" before an exception name substring indicates that transactions should commit even if this exception is thrown; a "-" that they should roll back.

Author:
Rod Johnson
Version: $Id: TransactionAttributeEditor.java,v 1.3 2004/02/02 11:24:51 jhoeller Exp $
Since: 24-Apr-2003
See Also: TransactionDefinition, Constants

Method Summary
 voidsetAsText(String s)
          Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,+Exception1,-Exception2.

Methods inherited from class java.beans.PropertyEditorSupport
firePropertyChange, isPaintable, supportsCustomEditor, getCustomEditor, addPropertyChangeListener, removePropertyChangeListener, getValue, setValue, getAsText, getJavaInitializationString, getTags, paintValue

Methods inherited from class java.lang.Object
hashCode, notify, notifyAll, wait, wait, wait, getClass, equals, toString

Method Detail

setAsText

public void setAsText(String s)
throws java.lang.IllegalArgumentException
Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,+Exception1,-Exception2. Null or the empty string means that the method is non transactional.
See Also:
java.beans.PropertyEditor.setAsText(java.lang.String)