org.springframework.aop.framework.autoproxy
Class AbstractAdvisorAutoProxyCreator

org.springframework.aop.framework.ProxyConfig
  |
  +--org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
        |
        +--org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
Direct Known Subclasses:
AdvisorAutoProxyCreator

public abstract class AbstractAdvisorAutoProxyCreator
extends AbstractAutoProxyCreator

Abstract BeanPostProcessor implementation that creates AOP proxies. This class is completely generic; it contains no special code to handle any particular aspects, such as pooling aspects.

Subclasses must implement the abstract findCandidateAdvisors() method to return a list of Advisors applying to any object. Subclasses can also override the inherited shouldSkip() method to exclude certain objects from autoproxying, but they must be careful to invoke the shouldSkip() method of this class, which tries to avoid circular reference problems and infinite loops.

Advisors or advices requiring ordering should implement the Ordered interface. This class sorts advisors by Ordered order value. Advisors that don't implement the Ordered interface will be considered to be unordered, and will appear at the end of the advisor chain in undefined order.

Author:
Rod Johnson
Version: $Id: AbstractAdvisorAutoProxyCreator.java,v 1.5 2004/02/02 11:22:54 jhoeller Exp $

Method Summary
 voidsetBeanFactory(BeanFactory beanFactory)
          We override this method to ensure that all candidate advisors are materialized under a stack trace including this bean.

Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
getOrder, postProcessAfterInitialization, postProcessBeforeInitialization, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setInterceptorNames, setOrder

Methods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, getExposeProxy, getOptimize, getProxyTargetClass, setExposeProxy, setOptimize, setProxyTargetClass, toString

Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
We override this method to ensure that all candidate advisors are materialized under a stack trace including this bean. Otherwise, the dependencies won't be apparent to the circular-reference prevention strategy in AbstractBeanFactory.
See Also:
org.springframework.beans.factory.BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)