There are two types of IoC containers:
1. Bean Factory Container
- simplest container providing basic support for DI
- proffered where resources are limited like mobile devices or applet based applications
- e.g. XmlBeanFactory (this container reads the configuration metadata from an XML file)
2. Application Context Container
- has more enterprise specific functionalities such as resolving textual messages from properties file and publishing application events to interested event listeners
- e.g.
- FileSystemXmlApplicationContext - load bean definition and configuration from an XML file. Need to provide full path of the xml file to the constructor.
- ClassPathXmlApplicationContext - load bean definition and configuration from an XML file. The xml file should be present in the CLASSPATH
- WebXmlApplicationContext - loads the XML file with definition of all beans from within a web application.
No comments:
Post a Comment