Announcement Announcement Module
Collapse
No announcement yet.
BeanFactory-Lazy VS ApplicationContext - SMART - Confusion Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X