There are three main properties that need to be specified:
If the "transactionManager" property is not set explicitly and this {@link FactoryBean}is running in a {@link ListableBeanFactory}, a single matching bean of type {@link PlatformTransactionManager} will be fetched from the {@link BeanFactory}.
In contrast to {@link TransactionInterceptor}, the transaction attributes are specified as properties, with method names as keys and transaction attribute descriptors as values. Method names are always applied to the target class.
Internally, a {@link TransactionInterceptor} instance is used, but the user of thisclass does not have to care. Optionally, a method pointcut can be specified to cause conditional invocation of the underlying {@link TransactionInterceptor}.
The "preInterceptors" and "postInterceptors" properties can be set to add additional interceptors to the mix, like {@link org.springframework.aop.interceptor.PerformanceMonitorInterceptor} or{@link org.springframework.orm.hibernate3.HibernateInterceptor} /{@link org.springframework.orm.jdo.JdoInterceptor}.
HINT: This class is often used with parent / child bean definitions. Typically, you will define the transaction manager and default transaction attributes (for method name patterns) in an abstract parent bean definition, deriving concrete child bean definitions for specific target objects. This reduces the per-bean definition effort to a minimum.
{@code@author Juergen Hoeller @author Dmitriy Kopylenko @author Rod Johnson @author Chris Beams @since 21.08.2003 @see #setTransactionManager @see #setTarget @see #setTransactionAttributes @see TransactionInterceptor @see org.springframework.aop.framework.ProxyFactoryBeanPROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED,readOnly }
|
|
|
|
|
|
|
|