org.springframework.transaction.interceptor
Class MatchAlwaysTransactionAttributeSource
java.lang.Object
org.springframework.transaction.interceptor.MatchAlwaysTransactionAttributeSource
- All Implemented Interfaces:
- TransactionAttributeSource
- public class MatchAlwaysTransactionAttributeSource
- extends java.lang.Object
- implements TransactionAttributeSource
Very simple implementation of TransactionAttributeSource which will always return
the same TransactionAttribute for all methods fed to it. The TransactionAttribute
may be specified, but will otherwise default to PROPOGATION_REQUIRED. This may be
used in the cases where you want to use the same transaction attribute with all
methods being handled by a transaction interceptor.
- Since:
- 15.10.2003
- Version:
- $Id: MatchAlwaysTransactionAttributeSource.java,v 1.5 2004/03/18 02:46:05 trisberg Exp $
- Author:
- Colin Sampaleanu
- See Also:
TransactionProxyFactoryBean
,
BeanNameAutoProxyCreator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatchAlwaysTransactionAttributeSource
public MatchAlwaysTransactionAttributeSource()
setTransactionAttribute
public void setTransactionAttribute(TransactionAttribute transactionAttribute)
- Allows a transaction attribute to be specified, using the String form, for
example, "PROPOGATION_REQUIRED".
- Parameters:
transactionAttribute
- The String form of the transactionAttribute to use.- See Also:
TransactionAttributeEditor
getTransactionAttribute
public TransactionAttribute getTransactionAttribute(java.lang.reflect.Method method,
java.lang.Class targetClass)
- Description copied from interface:
TransactionAttributeSource
- Return the transaction attribute for this method.
Return null if the method is non-transactional.
- Specified by:
getTransactionAttribute
in interface TransactionAttributeSource
- Parameters:
method
- methodtargetClass
- target class. May be null, in which case the declaring
class of the method must be used.
- Returns:
- TransactionAttribute transaction attribute or null.
Copyright (C) 2003-2004 The Spring Framework Project.