|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.transaction.interceptor.AttributesTransactionAttributeSource
Implementation of TransactionAttributeSource that uses attributes from an Attributes implementation.
Defaults to using class's transaction attribute if none is associated with the target method. Any transaction attribute associated with the target method completely overrides a class transaction attribute.
This implementation caches attributes by method after they are first used. If it's ever desirable to allow dynamic changing of transaction attributes (unlikely) caching could be made configurable. Caching is desirable because of the cost of evaluating rollback rules.
Attributes
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
AttributesTransactionAttributeSource(Attributes attributes)
|
Method Summary | |
protected TransactionAttribute |
computeTransactionAttribute(java.lang.reflect.Method method,
java.lang.Class targetClass)
Same return as getTransactionAttribute method, but doesn't cache the result. |
protected TransactionAttribute |
findTransactionAttribute(java.util.Collection atts)
Return the transaction attribute, given this set of attributes attached to a method or class. |
TransactionAttribute |
getTransactionAttribute(java.lang.reflect.Method method,
java.lang.Class targetClass)
Return the transaction attribute for this method invocation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public AttributesTransactionAttributeSource(Attributes attributes)
Method Detail |
public TransactionAttribute getTransactionAttribute(java.lang.reflect.Method method, java.lang.Class targetClass)
getTransactionAttribute
in interface TransactionAttributeSource
method
- method for the current invocation. Can't be nulltargetClass
- target class for this invocation. May be null.
protected TransactionAttribute computeTransactionAttribute(java.lang.reflect.Method method, java.lang.Class targetClass)
protected TransactionAttribute findTransactionAttribute(java.util.Collection atts)
atts
- attributes attached to a method or class. May
be null, in which case a null TransactionAttribute will be returned.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |