public class

TargetClassLoaderTransactionProxyFactoryBean

extends TransactionProxyFactoryBean
java.lang.Object
   ↳ org.springframework.aop.framework.ProxyConfig
     ↳ org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
       ↳ org.springframework.transaction.interceptor.TransactionProxyFactoryBean
         ↳ com.atlassian.confluence.spring.transaction.interceptor.TargetClassLoaderTransactionProxyFactoryBean

Class Overview

Proxy factory bean that extends 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.

Summary

Public Constructors
TargetClassLoaderTransactionProxyFactoryBean()
Public Methods
void setTarget(Object target)
Set the bean to be wrapped with a transactional proxy.
Protected Methods
Object getProxy(AopProxy proxy)
Returns the proxy object to expose.
[Expand]
Inherited Methods
From class org.springframework.transaction.interceptor.TransactionProxyFactoryBean
From class org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
From class org.springframework.aop.framework.ProxyConfig
From class java.lang.Object
From interface org.springframework.beans.factory.BeanClassLoaderAware
From interface org.springframework.beans.factory.BeanFactoryAware
From interface org.springframework.beans.factory.FactoryBean
From interface org.springframework.beans.factory.InitializingBean

Public Constructors

public TargetClassLoaderTransactionProxyFactoryBean ()

Public Methods

public void setTarget (Object target)

Set the bean to be wrapped with a transactional proxy.

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.
Parameters
target the object that will be wrapped with a transactional argument. Must not be null.
Throws
IllegalArgumentException if the target parameter is null

Protected Methods

protected Object getProxy (AopProxy proxy)

Returns the proxy object to expose.

This implementation uses the class loader of the target object, to allow plugins to use transaction-wrapped beans.
Parameters
proxy the prepared AopProxy instance to get the proxy from
Returns
  • the proxy object to expose