com.atlassian.confluence.core
Class PointcutClassLoaderProcessor

java.lang.Object
  extended by com.atlassian.confluence.core.PointcutClassLoaderProcessor
All Implemented Interfaces:
org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.core.Ordered

public final class PointcutClassLoaderProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.core.Ordered

BeanPostProcessor that swaps out Spring's default AspectJExpressionPointcut and substitutes it for an implementation that is customised to use the Confluence application classloader. This is needed as the default implementation of the AspectJ pointcut uses the current context class loader for class resolution. The context class loader does not know about the plugin classloader and this results in gross inefficiencies when plugin classes are used in a Spring context.


Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
PointcutClassLoaderProcessor()
           
 
Method Summary
 int getOrder()
           
 java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
           
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
           
 void setBeanClassLoader(java.lang.ClassLoader classLoader)
           
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointcutClassLoaderProcessor

public PointcutClassLoaderProcessor()
Method Detail

postProcessBeforeInitialization

public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
                                                        java.lang.String beanName)
                                                 throws org.springframework.beans.BeansException
Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

postProcessAfterInitialization

public java.lang.Object postProcessAfterInitialization(java.lang.Object bean,
                                                       java.lang.String beanName)
                                                throws org.springframework.beans.BeansException
Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

setBeanClassLoader

public void setBeanClassLoader(java.lang.ClassLoader classLoader)
Specified by:
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware

setOrder

public void setOrder(int order)

getOrder

public int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered


Copyright © 2003-2014 Atlassian. All Rights Reserved.