posted 12 years ago
Hi all,
Can someone please explain my question according to following paragraph in "Spring in action"
"another big difference between an application context and a bean factory is how
singleton beans are loaded. A bean factory lazily loads all beans, deferring bean
creation until the getBean() method is called. An application context is a bit
smarter and preloads all singleton beans upon context startup".
1:What is the difference between bean "loading" and bean "initialisation" or "creation"?
2:If we want to access a bean using the ApplicationContext,then do we need to use following code:
or the beans are automatically created without the above line.
Similarly ,is it necessary to give the following code in case of BeanFactory:
Thanks,
Sudhanshu(OCPJP,OCEJPAD)