Open In App

J2EE Multitier Architecture

Last Updated : 04 Jul, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

A tier is an abstract concept that defines a group of technologies that provide one or more services to its clients. In multi-tier architecture, each tier contains services that include software objects, DBMS, or connectivity to legacy systems. IT departments of corporations employ multi-tier architecture because it’s a cost-effective way to build an application that is flexible, scalable, and responsive to the expectation of clients.

N TIER MULTITIER ARCHITECTURE

N TIER MULTITIER ARCHITECTURE

The functionality of the application is divided into logical components that are associated with a tier. Each component is a service that is built and maintained independently of the other services. Services are bound together by a communication protocol that enables service and sends information from and to other services.

Multi-Tier Architecture

Multi-tier architecture is composed of:

  1. Clients: It Refers to a program that requests service from a component.
  2. Resource: A resource is anything a component needs to provide a service.
  3. Component: It is part of a tier that consists of a collection of classes or a program that performs a function to provide a service.
  4. Containers: It is software that manages a component and provides system services to the component. A container handles persistence, resource management, security, threading, and other system-level services from components that are associated with the container. Example: APIs.

J2EE Architecture

J2EE is a four-tier architecture that consists of:

  1. Client Tier/ Presentation Tier
  2. Web Tier 
  3. Enterprise JavaBeans Tier/ Business Tier 
  4. Enterprise Information Systems Tier

These tiers are explained in detail below.

1. Client Tier/ Presentation Tier

It consists of programs that interact with the users. These components prompt the user for the input conversion as
a request to forward to software on the component that processes the request and returns the result to the client program. Components under Client tier in J2EE Specification:

  • Applet Client- It is a component used by Web clients that operate within Applet Container. It is a Java-enabled web browser.
  • Application Client –It is a Java application that operates within the application container. It is the Java Runtime Environment (JRE).
  • Rich client- This does not come under J2EE Specification. This is not considered a component of the client because it can be written in a language other than Java. J2EE does not define containers for Rich clients but these clients access any tier in the environment using HTTP, SOAP, and ebXML protocols.
  • Clients are classified by the technology used to access the components and resources. 

Categories of Client Tier: There are 5 categories of clients

  • Web Client,
  • Java Beans Client
  • EIS Client
  • Web-service peers and
  • Multi-tier client.

2. Web Tier

It provides the Internet functionality to the J2EE  application. The components on the web tier use HTTP to receive requests and send responses to the client that resides on the tier. Web-Tier Provides services to Client-tier using HTTP. The responsibilities act as an intermediary between components working on the web tier and other tiers and the client tier. The intermediary activities are:

  • Accepting info from other s/w sent using POST, GET, and PUT using HTTP.
  • Transmit data such as images and dynamic content.

Components of Web Tier: Two components that work on the web tier are mentioned below:

  • Servlets
  • Java server pages (JSP)

3. Enterprise Java Beans Tier Implementation

It contains business logic for J2EE applications. In this tier two or more EJB reside. It is a keystone for every J2EE  Application. EJB beans are contained in the EJB server- which is a distributed object server that works on the EJB tier and manages transactions, and security, and ensures multi-threading and persistence when EJB are accessed. EJB tier provides concurrency, scalability, life cycle management, and fault-tolerant ( Back-Up) to the J2EE applications. EJB-Tier manages (Creating/Destroying, also moving components in/out of memory) the instances of the components. Collectively EJB-Server and EJB-Container are responsible for providing low-level system services required to implement the business logic of Enterprise Java Beans.

Some of the system services include Resource Pooling, Distributed object protocols, thread management, State Management, Process Management, Object persistence, Security, and Deployment Configuration.

4. Enterprise Information System Tier

EIS tier links the J2EE application to resources and legacy systems that are available on the corporate backbone network. It is the tier where the J2EE applications directly or indirectly interface with a variety of technologies including DBMS and Mainframes. Components on the EIS communicate to resources using CORBA or Java Connectors. 

Access Control List (ACL)

  • It controls communication between tiers. 
  • It acts as a bridge on different virtual networks because it adds security to web Applications. 
  • ACL prevents hackers to access DBMS and similar resources.

EIS-Tier provides connectivity to the resources that are not part of J2EE- which includes resources such as Legacy Systems, DBMS, and systems provided by third-party. Provides flexibility to developers to connect resources that are not part of J2EE using CORBA and Java Connectors or through proprietary protocols.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads