Java - Container

Java Conceptuel Diagram


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 configuration of the services
  • the override of functionality for the non-configurable services.

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


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:

  • Life cycle management
  • Code generation
  • Security
  • Transaction management
  • Locking and concurrency control
  • Persistence management


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

On the client

  • Application client container: Manages the execution of application client components.
  • Applet container: Manages the execution of applets. Consists of a Web browser and Java Plug-in running on the client together.



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

  • security: The component (web, bean) are only accessed by authorized users.
  • transaction management: The J2EE transaction model lets you specify relationships among methods that make up a single transaction so that all methods in one transaction are treated as a single unit.
  • Java Naming and Directory Interface (JNDI) lookups: JNDI lookup services provide a unified interface to multiple naming and directory services in the enterprise so that application components can access naming and directory services.
  • and remote connectivity. The J2EE remote connectivity model manages low-level communications between clients and enterprise beans. After an enterprise bean is created, a client invokes methods on it as if it were in the same virtual machine.


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

Discover More
Card Puncher Data Processing
Hudson - Installation version 3.0.0-RC3 (Standalone and Weblogic)

Installation of Hudson in: as a standalone application or in a Weblogic java container Download the Hudson.war Hudson can run in a standalone...
Card Puncher Data Processing
JPA - Entity Manager

To manage entities in your persistence application, you need to obtain an javax/persistence/EntityManagerentity manager from an javax/persistence/EntityManagerFactoryEntityManagerFactory. An javax/persistence/EntityManagerEntityManager...
Jdeveloper Create Managed Bean
JSF - (Managed Bean|Controller)

Managed Beans (also known as model objects and controllers) are lightweight container-managed objects (POJOs) with minimal requirements. They support a small set of basic services, such as: resource...
J2ee Server
Java - Application Server

application server in Java A J2EE Server is application server on the J2EE platform. It contains the web-tier and the business tier where the components are placed in logical container. Tier Components...
Java Conceptuel Diagram
Java - Dependency Injection (DI)

Dependency injection in Java. This page is injection of a java dependency in a class. Google: Dagger is is dependency injection at compile time while Guice is at runtime ...
Java Conceptuel Diagram
Java - Deployment descriptors (Metadata)

Deployment descriptors are XML documents included in the JARs that describes: component's configuration, deployment settings of an application, a module, or a component of and instructions to the...
J2ee Architecture
Java - EJB: Enterprise Java Bean (enterprise beans)

Enterprise beans are server-side J2EE components and run on the J2EE server in their EJB container which manages their execution. (Enterprise JavaBeans component model) They handle the business logic...
Eclipselink Classpath
Java - Eclipse Link (JPA, JAXB, Persistence Provider)

EclipseLink delivers a comprehensive open-source Java persistence solution implemeting: EclipseLink JPA: a Java Persistence provider for relational databases (Object-Relational...
Java Conceptuel Diagram
Java - J2EE - Web Services Implementation

Java Web services are implemented according to the JSR 109: Implementing Enterprise Web Services specification, which defines the standard Java EE runtime architecture...
Java Conceptuel Diagram
Java - J2EE Connector architecture (JCA)

The J2EE Connector architecture is used by J2EE tools vendors and system integrators to create resource adapters that support access to application enterprise information systems that can be plugged into...

Share this page:
Follow us:
Task Runner