From 27d390c221151c795849af8f59c9ec6087ad439f Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Tue, 28 Dec 2010 10:06:00 +0000 Subject: [PATCH] SPR-2946 - Corrected documentation for lazy-init behaviour on Bean(Factory)PostProcessors. Changed the documentation to correctly state that B(F)PP are instantiated eagerly no matter if they are explicitly marked as to be lazy initialized or the default-lazy-init attribute is used at a element. git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3834 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../src/beans-extension-points.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-framework-reference/src/beans-extension-points.xml b/spring-framework-reference/src/beans-extension-points.xml index e0c9747cfe3..1bcc09886af 100644 --- a/spring-framework-reference/src/beans-extension-points.xml +++ b/spring-framework-reference/src/beans-extension-points.xml @@ -283,15 +283,14 @@ org.springframework.scripting.groovy.GroovyMessenger@272961 would any other bean. - As with BeanPostProcessors, you typically do not - want BeanFactoryPostProcessors marked as - lazy-initialized. If they are marked as such, the Spring container never - instantiates them, and thus they cannot apply their custom logic. If you - use the default-lazy-init attribute on the - declaration of your <beans/> element, be sure - to mark your various - BeanFactoryPostProcessor bean definitions - with lazy-init="false". + As with BeanPostProcessors, you typically + do not want BeanFactoryPostProcessors marked as + lazy-initialized. If no other bean references a Bean(Factory)PostProcessor + those wouldn't get instantiated at all. Thus, marking them as + lazy-initialized will be ignored and the Bean(Factory)PostProcessor + will be instantied eagerly even if you use the default-lazy-init + attribute set to trueon the declaration of your + element.