org.springframework.transaction.interceptor
Class TransactionAttributeEditor

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

public class TransactionAttributeEditor
extends java.beans.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.

Since:
24-Apr-2003
Version:
$Id: TransactionAttributeEditor.java,v 1.4 2004/03/18 02:46:05 trisberg Exp $
Author:
Rod Johnson
See Also:
TransactionDefinition, Constants

Constructor Summary
TransactionAttributeEditor()
           
 
Method Summary
 void setAsText(java.lang.String s)
          Format is PROPAGATION_NAME,ISOLATION_NAME,readOnly,+Exception1,-Exception2.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, 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(java.lang.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.

Throws:
java.lang.IllegalArgumentException
See Also:
PropertyEditor.setAsText(java.lang.String)


Copyright (C) 2003-2004 The Spring Framework Project.