What exactly is a container in J2EE and how does it help?

前端 未结 4 617
余生分开走
余生分开走 2021-01-30 07:30

I\'m reading J2EE 1.4 spec right now and there are lot of terms that I do not understand do what. This is from the specs for containers:

Containers provid

4条回答
  •  無奈伤痛
    2021-01-30 07:46

    J2EE/Java EE applications aren't self contained. In order to be executed, they need to be deployed in a container. In other words, the container provides an execution environment on top of the JVM.

    Also, applications rely on several APIs like JPA, EJB, servlet, JMS, JNDI, etc. The role of the EE compliant container is to provide a standard implementation of all or some of these APIs. This means you can theoretically run your application on top of any container as long as it relies on standard APIs.

    From a technical perspective, a container is just another Java SE application with a main() method. EE applications on the other hand are a collection of services/beans/servlets/etc. The container finds these components and runs them, providing API implementations, monitoring, scalability, reliability and so on.

提交回复
热议问题