Class 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.

    • Constructor Detail

      • PointcutClassLoaderProcessor

        public PointcutClassLoaderProcessor()
    • Method Detail

      • postProcessBeforeInitialization

        public Object postProcessBeforeInitialization​(Object bean,
                                                      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 Object postProcessAfterInitialization​(Object bean,
                                                     String beanName)
                                              throws org.springframework.beans.BeansException
        Specified by:
        postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException
      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      • setOrder

        public void setOrder​(int order)
      • getOrder

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