In spring we have two IOC containers and one Web Container is in Spring MVC:
1. Core container (BeanFactory)
2. J2EE container (ApplicationContext/ConfigurableApplicationContext)
3. Web Container
This web container is prepared on top of IOC container.
IOC types Hierarchy |
What container will do ?
Below are few tasks of containers :
- read xml files (web.xml)
- create instances of xml beans classes/servlet...POJO
- manage lifecycle of bean classes/servlet...POJO
- it will supply dynamic parameters to bean classes/servlet..POJO as eg. init param and context param in servlet ;)
Note: XMLs are used to give input to POJO classes and Associated references to make our layers loosely coupled.
Dependency Injection (DI) is the main asset of the IOC container.
This web container is prepared on top of IOC container.
No comments:
Post a Comment