Feb 29th, 2012, 03:41 AM
BeanFactory-Lazy VS ApplicationContext - SMART - Confusion
Iam new to Spring and i came to know that
BeanFactory is Lazy ie., instantiates object only when getBean() is invoked.
and ApplicationContext instantiates object when the context is up.
As far as my understanding,
ApplicationContext ctx = new ClasspathApplicationContext("/blah.xml");
SuperBean bean = (SuperBean)ctx.getBean("someBean");
Consider this is one among the code in my application may be in service layer.
Can any one tel me how this "someBean" is recognised as ApplicationContext and instantiated when the context is up.?
Iam lost in this aspect.
Senthil Kumar Sekar