|
From: Bob L. <cra...@cr...> - 2006-06-30 15:45:43
|
I'm a little new to this. It seems strange to me that you can lazily initialize on a bean-by-bean basis. Don't you want to lazy load everything during development (faster turnaround time on the section of code you're working on) and eagerly load everything in production (consistent performance for users)? Bob On 6/18/06, Juergen Hoeller <ju...@in...> wrote: > > This is actually expected behavior: lazy-init has stronger effect in > Spring > 2.0 now, not even loading the affected bean classes until they are > explicitly accessed. > > For an application context's type detection (such as > BeanFactoryPostProcessor detection or ApplicationListener detection), we > only check beans that allow for eager initialization now (i.e. that are > not > marked as lazy-init and are not FactoryBeans). > > Else we'd have to load each and every bean class just to find out those > special beans, which would require all bean classes to be present and > loadable - and exactly that is what we intend to avoid with the new > semantics in the first place. > > A further goodie enabled by lazy class loading for lazy-init beans is that > a > PropertyPlaceholderConfigurer can even resolve placeholders in bean class > names now, at least for beans marked as lazy-init. > > So the recommended solution in case of default-lazy-init=true would be to > explicitly mark all affected beans (the ones supposed to be autodetected) > as > lazy-init=false. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Claus Nordahl > Sent: Sunday, June 11, 2006 2:26 AM > To: spr...@li... > Subject: [Springframework-developer] Changed behavior for > default-lazy-init="true" in 2.0 M5 > > Hi all, > > When using default-lazy-init="true" with the 2.0 M5 release, I find that > neither does my PropertyPlaceholderConfigurer's do its stuff nor does my > ApplicationListener's receive any events as they all did with previous > releases. > > Is this expected behavior? > > Regards, > Claus Nordahl > > > > > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |