I am learning Spring and the term “Spring Container” frequently shows up in the text. However, I know “container” is not used only in Spring (EJB container etc) so what does it mean when used in the context of programming?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The container is something that contains something else.
In spring: Spring container contains beans (Java objects that are subject to dependency-injection)
Servlet containers contain servlets, filters, listeners, etc. and manages their state and lifecycle. There are also similar portlet containers
EJB containers contain EJBs (stateless, stateful, message-driven) and, as above, manage their pooling and lifecycle
java.awt.Container“is a component that can contain other AWT components“As you can see the role of the container is to own and manage a set of objects so you don’t have to instantiate them directly.