Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » aop » framework » autoproxy » target » [javadoc | source]
org.springframework.aop.framework.autoproxy.target
public class: LazyInitTargetSourceCreator [javadoc | source]
java.lang.Object
   org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
      org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator

All Implemented Interfaces:
    DisposableBean, BeanFactoryAware, TargetSourceCreator

TargetSourceCreator that enforces a LazyInitTargetSource for each bean that is defined as "lazy-init". This will lead to a proxy created for each of those beans, allowing to fetch a reference to such a bean without actually initialized the target bean instance.

To be registered as custom TargetSourceCreator for an auto-proxy creator, in combination with custom interceptors for specific beans or for the creation of lazy-init proxies only. For example, as autodetected infrastructure bean in an XML application context definition:

<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="customTargetSourceCreators">
<list>
<bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator"/>
</list>
</property>
</bean>

<bean id="myLazyInitBean" class="mypackage.MyBeanClass" lazy-init="true">
...
</bean>
Fields inherited from org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator:
logger
Method from org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator Summary:
createBeanFactoryBasedTargetSource,   isPrototypeBased
Methods from org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator:
buildInternalBeanFactory,   createBeanFactoryBasedTargetSource,   destroy,   getBeanFactory,   getInternalBeanFactoryForBean,   getTargetSource,   isPrototypeBased,   setBeanFactory
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator Detail:
 protected AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class beanClass,
    String beanName) 
 protected boolean isPrototypeBased()