VMware vRealize Automation 8.x (2022) — Question 58
Which two statements describe the ApplicationContext correctly? (Choose two.)
Answer options
- A. The ApplicationContext is the root interface for accessing the Spring container.
- B. The ApplicationContext lazy initializes beans by default.
- C. The ApplicationContext can be created in a test environment, web application, and in a standalone application.
- D. The ApplicationContext does not include all functionality of the BeanFactory.
- E. The ApplicationContext maintains singleton beans that are instantiated by the Spring runtime.
Correct answer: C, E
Explanation
The correct answers are C and E because the ApplicationContext can indeed be utilized in various environments such as testing, web, and standalone applications, and it is responsible for maintaining singleton beans created by the Spring runtime. Options A and B are incorrect as they misrepresent the roles of the ApplicationContext, while D incorrectly states that the ApplicationContext lacks functionalities present in the BeanFactory.