| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.springframework.aop.framework.ProxyConfig | +--org.springframework.transaction.interceptor.TransactionProxyFactoryBean
Proxy factory bean for simplified declarative transaction handling. Alternative to the standard AOP ProxyFactoryBean with a TransactionInterceptor.
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.
In contrast to 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 TransactionInterceptor instance is used, but the user of this class does not have to care. Optionally, a MethodPointcut can be specified to cause conditional invocation of the underlying TransactionInterceptor.
The preInterceptors and postInterceptors properties can be set to add additional interceptors to the mix, like PerformanceMonitorInterceptor or HibernateInterceptor/JdoInterceptor.
| Method Summary | |
void | afterPropertiesSet() |
Object | getObject() |
Class | getObjectType() |
boolean | isSingleton() |
void | setPointcut(Pointcut pointcut)Set a pointcut, i.e a bean that can cause conditional invocation of the TransactionInterceptor depending on method and attributes passed. |
void | setPostInterceptors(Object[] preInterceptors)Set additional interceptors (or advisors) to be applied after the implicit transaction interceptor, e.g. |
void | setPreInterceptors(Object[] preInterceptors)Set additional interceptors (or advisors) to be applied before the implicit transaction interceptor, e.g. |
void | setProxyInterfaces(String[] interfaceNames)Optional: You only need to set this property to filter the set of interfaces being proxied (default is to pick up all interfaces on the target), or if providing a custom invoker interceptor instead of a target. |
void | setTarget(Object target)Set the target object, i.e. |
void | setTransactionAttributes(Properties transactionAttributes)Set properties with method names as keys and transaction attribute descriptors (parsed via TransactionAttributeEditor) as values: e.g. |
void | setTransactionManager(PlatformTransactionManager transactionManager)Set the transaction manager. |
| Methods inherited from class org.springframework.aop.framework.ProxyConfig |
copyFrom, getExposeProxy, getOptimize, getProxyTargetClass, setExposeProxy, setOptimize, setProxyTargetClass, toString |
| Method Detail |
public void afterPropertiesSet()
throws org.springframework.aop.framework.AopConfigException
public Object getObject()
public Class getObjectType()
public boolean isSingleton()
public void setPointcut(Pointcut pointcut)
public void setPostInterceptors(Object[] preInterceptors)
Note that this is just necessary if you rely on those interceptors in general: HibernateTemplate and JdoTemplate work nicely with JtaTransactionManager through implicit on-demand thread binding.
public void setPreInterceptors(Object[] preInterceptors)
public void setProxyInterfaces(String[] interfaceNames)
throws AspectException,
java.lang.ClassNotFoundException
If left null (the default), the AOP infrastructure works out which interfaces need proxying.
public void setTarget(Object target)
public void setTransactionAttributes(Properties transactionAttributes)
Note: Method names are always applied to the target class, no matter if defined in an interface or the class itself.
public void setTransactionManager(PlatformTransactionManager transactionManager)
| Association Links |
to Class java.lang.Class
to Class java.util.Properties
to Class org.springframework.aop.Pointcut
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||