Table of Contents

Java - Container

About

A container is a logical part of a J2EE Server which contains java components

J2ee Server

Before any component can be executed, it must be assembled. The assembly process involves per logical container:

The fact that the J2EE architecture provides configurable services means that application components within the same J2EE application can behave differently based on where they are deployed.

For example, an enterprise bean can have security settings that allow it a certain level of access to database data in one production environment and another level of database access in another production environment.

Type of container

On the J2EE Server

EJB

An EJB container is a run-time container for beans that are deployed to an application server. The container is automatically created when the application server starts up, and serves as an interface between a bean and run-time services such as:

A container is automatically created when the application server starts up, and serves as an interface between a bean and run-time services such as:

Web

Manages the execution of JSP page and web components for J2EE applications.

On the client

Services

Configurable

The assembly process involves the container settings in order to configure services such as:

Non-configurable

The container also manages non-configurable services such as:

Although data persistence is a non-configurable service, the J2EE architecture lets you override container-managed persistence by including the appropriate code in your enterprise bean implementation when you want more control than the default container-managed persistence provides. For example, you might use bean-managed persistence to implement your own finder (search) methods or to create a customized database cache.

Documentation / Reference