Spring IOC Container
The IoC container is responsible to instantiate, configure and assemble the objects. The IoC container gets informations from the XML file and works accordingly. The main tasks performed by IoC container are:
1) to instantiate the application class
2) to configure the object
3) to assemble the dependencies between the objects
There are two types of IoC containers. They are:
1) BeanFactory
2) ApplicationContext
The BeanFactory and the ApplicationContext interfaces acts as the IoC container. The ApplicationContext interface is built on top of the BeanFactory interface. It adds some extra functionality than BeanFactory such as simple integration with Spring's AOP, message resource handling (for I18N), event propagation, application layer specific context (e.g. WebApplicationContext) for web application. So it is better to use ApplicationContext than BeanFactory.
Comments
Post a Comment