j2ee container: Getting Started ejb concept web container and container

In J2EE, the container acts as the role of middleware.

The concept of the two main container

Web container

To a state in which the application components (JSP, Servlet) to provide an environment that JSP, Servlet containers directly and environment variables, interactive interface without paying attention to other system problems. Mainly achieved by the Web server, such as Tomcat, WebLogic and Websphere and so on. The interfaces provided by the container in strict compliance with the J2EE specification of standard Web Application. We comply with the above standard Web server called J2EE in the Web container.

EJB(Enterprise Java Bean)容器

Enterprise Java Bean container. More industries characteristics. In which he provided to run EJB components various management functions. As long as the J2EE specification EJB placed in the container, the container will be immediately performed efficient management. And the system can be obtained through existing level of service interfaces, such as mail service and transaction management. Web and EJB containers in principle is much the same, the difference is more isolated from the external environment. More Web container and HTTP-based requests are dealing with. The EJB container is not, it is more and databases and other services to deal with. But they are to interact with the outside world, so as to reduce the burden on the application. Such as HTTP Servlet do not care about the details, a direct reference to environment variables session, request and response on the line; EJB do not care about the database connection speed, various transaction control, directly to the vessel to complete.

 

"Only you teach me worry, only you are my dream."

Guess you like

Origin www.cnblogs.com/yanggb/p/10875253.html