spring-framework / org.springframework.transaction.interceptor

Package org.springframework.transaction.interceptor

Types

CompositeTransactionAttributeSource

open class CompositeTransactionAttributeSource : TransactionAttributeSource, Serializable

Composite TransactionAttributeSource implementation that iterates over a given array of TransactionAttributeSource instances.

MatchAlwaysTransactionAttributeSource

open class MatchAlwaysTransactionAttributeSource : TransactionAttributeSource, Serializable

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 PROPAGATION_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.

MethodMapTransactionAttributeSource

open class MethodMapTransactionAttributeSource : TransactionAttributeSource, BeanClassLoaderAware, InitializingBean

Simple TransactionAttributeSource implementation that allows attributes to be stored per method in a Map.

NameMatchTransactionAttributeSource

open class NameMatchTransactionAttributeSource : TransactionAttributeSource, Serializable

Simple TransactionAttributeSource implementation that allows attributes to be matched by registered name.

NoRollbackRuleAttribute

open class NoRollbackRuleAttribute : RollbackRuleAttribute

Tag subclass of RollbackRuleAttribute that has the opposite behavior to the RollbackRuleAttribute superclass.

TransactionAttributeEditor

open class TransactionAttributeEditor : PropertyEditorSupport

PropertyEditor for TransactionAttribute objects. Accepts a String of form

PROPAGATION_NAME, ISOLATION_NAME, readOnly, timeout_NNNN,+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. Timeout values are in seconds. If no timeout is specified, the transaction manager will apply a default timeout specific to the particular transaction manager.

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

TransactionAttributeSourceAdvisor

open class TransactionAttributeSourceAdvisor : AbstractPointcutAdvisor

Advisor driven by a TransactionAttributeSource, used to include a TransactionInterceptor only for methods that are transactional.

Because the AOP framework caches advice calculations, this is normally faster than just letting the TransactionInterceptor run and find out itself that it has no work to do.

TransactionAttributeSourceEditor

open class TransactionAttributeSourceEditor : PropertyEditorSupport

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. "notify*" for "notify" and "notifyAll".

TransactionalProxy

interface TransactionalProxy : SpringProxy

A marker interface for manually created transactional proxies.

TransactionAttributeSourcePointcut will ignore such existing transactional proxies during AOP auto-proxying and therefore avoid re-processing transaction metadata on them.