- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Application context and Beanfactory in Spring framework
Spring framework provides two IOC container for managing, configuring and manipulating beans. One is BeanFactory and the other is Application Context.
The application context interface extends BeanFactory to enhance the functionality of BeanFactory.
In new Spring versions, BeanFactory is replaced with ApplicationContext. But still, BeanFactory exists for backward compatibility.
Spring version 2.0 and above, is used BeanPostProcessor extension point(Interface which provides some callback methods that we can implement to customize the instantiation logic, dependency-resolution logic and etc ). So, if you are using BeanFactory then some of the functionality such as AOP and transaction will not work without doing some extra configuration.
Sr. No. | Key | Beanfactory | Application context |
---|---|---|---|
1 | Implementation | XMLBeanFactory implements BeanFactory | FileSystemXmlApplicationContext, ClassPathXmlApplicationContext and AnnotationConfigWebApplicationContex implements ApplicationContext. Also, ApplicationContext extends Beanfactory |
2 | Annotation | No | Yes |
3 | instantiation | Benafactory instantiate beans when getBean() method gets called. | Application instainte bean at the time container start. |
4 | Event Publication | Bean factory does not have the ability to push events to the beans | Application Context have ability to push to push events to the beans. |
5 | Loading Mechanism | Lazy loading | Aggressive Loading |
- Related Articles
- Difference between applicationContext.xml and spring-servlet.xml in Spring Framework
- Difference between and in Ionic framework?
- Difference between DispatcherServlet and ContextLoaderListener in Spring
- Difference between IOC and Dependency Injection in Spring.
- Difference between @Bean and @Component annotation in Spring.
- Difference between Spring AOP and AspectJ AOP
- Difference Between Constructor Injection and Setter Injection in Spring
- Difference Between Applet and Application
- Difference between JDK dynamic proxy and CGLib proxy in Spring
- Difference between System software and Application software
- Difference between Web Server and Application Server
- What is the difference between context switching and interrupt handling?
- Difference between system level exception and Application level exception.
- Comparison between C# and .NET Framework
- Difference between application/x-javascript and text/javascript content types?

Advertisements