org.springframework.transaction.interceptor |
AOP-based solution for declarative transaction demarcation.
Builds on the AOP infrastructure in org.springframework.aop.framework.
Any POJO can be transactionally advised with Spring.
The TransactionFactoryProxyBean can be used to create transactional
AOP proxies transparently to code that uses them.
The TransactionInterceptor is the AOP Alliance MethodInterceptor that
delivers transactional advice, based on the Spring transaction abstraction.
This allows declarative transaction management in any environment,
even without JTA if an application uses only a single database.
|
Java Source File Name | Type | Comment |
AbstractFallbackTransactionAttributeSource.java | Class | Abstract implementation of
TransactionAttributeSource that caches
attributes for methods and implements a fallback policy: 1. |
AttributesTransactionAttributeSource.java | Class | Implementation of the TransactionAttributeSource interface that
reads metadata via Spring's Attributes abstraction. |
CompositeTransactionAttributeSource.java | Class | Composite
TransactionAttributeSource implementation that iterates
over a given array of
TransactionAttributeSource instances. |
DefaultTransactionAttribute.java | Class | Transaction attribute that takes the EJB approach to rolling
back on runtime, but not checked, exceptions. |
DelegatingTransactionAttribute.java | Class | TransactionAttribute implementation that delegates all calls to a given target
TransactionAttribute. |
MatchAlwaysTransactionAttributeSource.java | Class | Very simple implementation of TransactionAttributeSource which will always return
the same TransactionAttribute for all methods fed to it. |
MethodMapTransactionAttributeSource.java | Class | Simple
TransactionAttributeSource implementation that
allows attributes to be stored per method in a
Map . |
NameMatchTransactionAttributeSource.java | Class | Simple
TransactionAttributeSource implementation that
allows attributes to be matched by registered name. |
NoRollbackRuleAttribute.java | Class | Tag subclass of RollbackRule. |
RollbackRuleAttribute.java | Class | Rule determining whether or not a given exception (and any subclasses) should
cause a rollback. |
RuleBasedTransactionAttribute.java | Class | TransactionAttribute implementation that works out whether a given exception
should cause transaction rollback by applying a number of rollback rules,
both positive and negative. |
TransactionAspectSupport.java | Class | Base class for transactional aspects, such as the AOP Alliance
TransactionInterceptor or an AspectJ aspect.
This enables the underlying Spring transaction infrastructure to be used
easily to implement an aspect for any aspect system.
Subclasses are responsible for calling methods in this class in the
correct order.
If no transaction name has been specified in the
TransactionAttribute , the exposed name will be the
fully-qualified class name + "." + method name
(by default).
Uses the Strategy design pattern. |
TransactionAttribute.java | Interface | This interface adds a rollbackOn specification to TransactionDefinition. |
TransactionAttributeEditor.java | Class | PropertyEditor for
TransactionAttribute objects. |
TransactionAttributeSource.java | Interface | Interface used by TransactionInterceptor. |
TransactionAttributeSourceAdvisor.java | Class | Advisor driven by a TransactionAttributeSource, used to exclude
a TransactionInterceptor from methods that are non-transactional. |
TransactionAttributeSourceEditor.java | Class | Property editor that converts a String into a
TransactionAttributeSource .
The transaction attribute string must be parseable by the
TransactionAttributeEditor in this package.
Strings are in property syntax, with the form:
FQCN.methodName=<transaction attribute string>
For example:
com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT
NOTE: The specified class must be the one where the methods are
defined; in case of implementing an interface, the interface class name.
Note: Will register all overloaded methods for a given name.
Does not support explicit registration of certain overloaded methods.
Supports "xxx*" mappings, e.g. |
TransactionInterceptor.java | Class | AOP Alliance MethodInterceptor providing declarative transaction
management using the common Spring transaction infrastructure.
Derives from the TransactionAspectSupport class. |
TransactionProxyFactoryBean.java | Class | Proxy factory bean for simplified declarative transaction handling.
This is a convenient alternative to a standard AOP
org.springframework.aop.framework.ProxyFactoryBean with a separate
TransactionInterceptor definition.
This class is intended to cover the typical case of declarative
transaction demarcation: namely, wrapping a singleton target object with a
transactional proxy, proxying all the interfaces that the target implements.
There are three main properties that need to be specified:
If the "transactionManager" property is not set explicitly and this
FactoryBean is running in a
ListableBeanFactory , a single matching bean of type
PlatformTransactionManager will be fetched from the
BeanFactory .
In contrast to
TransactionInterceptor , the transaction attributes are
specified as properties, with method names as keys and transaction attribute
descriptors as values. |