could you explain the difference between beanfactory and applicationcontext

could you explain the difference between beanfactory and applicationcontext
LVL 9
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
 
for_yanCommented:

Application context has more functions - BeanFactory is only
part of functionality of ApplicationContext for creating Beans:

Not all functions of ApplicationsContext are very easy to understand,
but you can read more on each of the items:
see here:
http://stackoverflow.com/questions/243385/new-to-spring-beanfactory-vs-applicationcontext


Bean Factory

    Bean instantiation/wiring

Application Context

    Bean instantiation/wiring
    Automatic BeanPostProcessor registration
    Automatic BeanFactoryPostProcessor registration
    Convenient MessageSource access (for i18n)
    ApplicationEvent publication

So if you need any of the points presented on the Application Context side (other than BeanFactory), you should use ApplicationContext.

You can alos read here
http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#context-introduction-ctx-vs-beanfactory
and here:
http://www.developersbook.com/spring/interview-questions/spring-interview-questions-faqs.php




0
 
for_yanCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.