Package com.atlassian.confluence.core
Class PointcutClassLoaderProcessor
java.lang.Object
com.atlassian.confluence.core.PointcutClassLoaderProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.core.Ordered
public final class PointcutClassLoaderProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
postProcessAfterInitialization
(Object bean, String beanName) postProcessBeforeInitialization
(Object bean, String beanName) void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) void
setOrder
(int order)
-
Constructor Details
-
PointcutClassLoaderProcessor
public PointcutClassLoaderProcessor()
-
-
Method Details
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessBeforeInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) - Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
setOrder
public void setOrder(int order) -
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-