What is a Container? There are many different types of containers. There are EJB Containers, Web Containers, servlet containers, and so on. In general, containers provide a hosting environment for software components to run in. Containers provide general services that can be used by the components within the environment, without the need or worry of being required by the component developer. A Web Container allows servlets, JSP components, and other Java classes to be deployed and executed within the container. Services like JNDI, connection pooling, and transaction services, can be configured at the container level, and the component developers don’t have to worry about the management of these resources; similar to the way in which EJB containers manages security, transactions, and bean pooling. When using the services provided by a container, component developers may have to give up some control of the environment to the container, in trade for important services that the developers don’t have to worry about building. Third-party vendors, who must follow certain guidelines that are explicitly laid out in public specifications, build these containers. Although each vendor is allowed to implement certain portions of the container in a proprietary manner, they must follow the specification to ensure that portability can be achieved by the developer. [Copy from TheServerSide book review Chapter 2]
There are many different types of containers. There are EJB Containers, Web Containers, servlet containers, and so on. In general, containers provide a hosting environment for software components to run in. Containers provide general services that can be used by the components within the environment, without the need or worry of being required by the component developer. A Web Container allows servlets, JSP components, and other Java classes to be deployed and executed within the container. Services like JNDI, connection pooling, and transaction services, can be configured at the container level, and the component developers don’t have to worry about the management of these resources; similar to the way in which EJB containers manages security, transactions, and bean pooling. When using the services provided by a container, component developers may have to give up some control of the environment to the container, in trade for important services that the developers don’t have to worry about building. Third-party vendors, who must follow certain guidelines that are explicitly laid out in public specifications, build these containers. Although each vendor is allowed to implement certain portions of the container in a proprietary manner, they must follow the specification to ensure that portability can be achieved by the developer.
[Copy from TheServerSide book review Chapter 2]
还有一个概念是EJB服务器,服务器是用来管理EJB容器的,一个服务器中可以有多个容器在运行。
EJB的生成,销毁等等工作,已经运行的环境,都是EJB容器提供的。
目前,EJB容器和EJB服务器之间没有明显的区别。