public class TargetClassLoaderTransactionProxyFactoryBean
extends org.springframework.transaction.interceptor.TransactionProxyFactoryBean
TransactionProxyFactoryBean
to use the class loader that the class of the
target object was loaded from. This can be used as a drop-in replacement for TransactionProxyFactoryBean
in situations where the proxy interface is not visible in the current context class loader. In particular, this is
useful for creating transaction-wrapped beans in plugin descriptors.Constructor and Description |
---|
TargetClassLoaderTransactionProxyFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Object |
getProxy(org.springframework.aop.framework.AopProxy proxy)
Returns the proxy object to expose.
|
void |
setTarget(Object target)
Set the bean to be wrapped with a transactional proxy.
|
createMainInterceptor, postProcessProxyFactory, setBeanFactory, setPointcut, setTransactionAttributes, setTransactionAttributeSource, setTransactionManager
afterPropertiesSet, createTargetSource, getObject, getObjectType, isSingleton, setAdvisorAdapterRegistry, setBeanClassLoader, setPostInterceptors, setPreInterceptors, setProxyClassLoader, setProxyInterfaces
public TargetClassLoaderTransactionProxyFactoryBean()
public void setTarget(Object target)
The target may be any object, in which case a SingletonTargetSource will be created. If it is a TargetSource, no wrapper TargetSource is created: This enables the use of a pooling or prototype TargetSource etc.
setTarget
in class org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
target
- the object that will be wrapped with a transactional argument. Must not be null
.IllegalArgumentException
- if the target
parameter is null
protected Object getProxy(org.springframework.aop.framework.AopProxy proxy)
This implementation uses the class loader of the target object, to allow plugins to use transaction-wrapped beans.
proxy
- the prepared AopProxy
instance to get the proxy fromCopyright © 2003–2016 Atlassian. All rights reserved.