One of the main advatage stated for Application Context is below :-
Application contexts provide a means
for resolving text messages
Could somebody explain with brief example what does that mean?
Second is there any overhead of using Application contexts over BeanFactory as i have seen most of the application using BeanFactory?
Here is the declaration of
ApplicationContext:One of the interfaces it extends is
MessageSource:From MessageSource Javadoc. This means you can use application context as a message source for your application with I18N support. Spring has a small framework for resolving messages, pattern replacement, etc.
With regards to your seconds question: you should always use the smallest possible interface you need. When you are injecting
BeanFactory, it is probably anApplicationContext, but there is no need to couple your class with such a huge abstraction. Just pick what you are going to use.