-
Feb 29th, 2012, 03:41 AM
#1
BeanFactory-Lazy VS ApplicationContext - SMART - Confusion
Hi,
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.
Thanks.
Regards
Senthil Kumar Sekar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules