Containers and JVMs


General J2EE: Containers and JVMs

  1. Containers and JVMs (1 messages)

    What do you mean when you say there are two separate containers in the J2EE environment, the servlet container and the EJB container?

    Does that mean that these containers are threads by themselves that run in the same JVM, or doe it mean that there are separate JVMs running these?

    Lets say there is another container, like the JCA container. Would that also run in the same JVM? Or would it create another JVM process?

    Im a little confused over the way these terms are used i think. :)

    Threaded Messages (1)

  2. Containers and JVMs[ Go to top ]

    Your confusion is natural. The problem is that different vendors implement these items in different ways. The boundary between "container" and "JVM" is vendor-specific.

    In fact, many vendors give you the option of running containers in separate JVMs (which maximizes isolation and robustness) or within one JVM (which minimizes memory usage and maximizes performance).

    The "one JVM" approach is probably the most common default. In this case, each container runs within a single JVM, shares some common resources (like database connection pools and JNDI contexts) but keeps other resources separate (thread pools, class loaders).