Vous êtes sur la page 1sur 5

Application Server Architecture

Above diagram depicts a simplest form of Application server architecture. For the
sake of better understandability I have shown few but most important components of
an Application server.

As application servers are predecessor of the Web servers, every J2EE application
server has in-built web server to handle the HTTP requests directly, but most of the
organization uses separate layer for the Web server implementation which causes the
redundancy for handling HTTP requests on app server as well as web servers.

With web servers you can handle only http requests but there is no such restriction
with the application servers. Application server gives you flexibility to work with
different kinds of protocols.
E.g. http, SMTP, IIOP, SOAP, TCP etc.

Following is the description for the each component diagram

Web Container:
This component of the Application server is most important as request will be
received by this component only at first on the behalf of application server.
As name suggests this will receive the request in terms of HTTP only & process them.
Web container locates the url in the request from the client browser & then maps it
accordingly to the correct JSP/Servlet or any HTML page.

Web container implements functionality of Web servers inside an application server.


Typically in an organization separate web container will be used in order to provide
feature such as security if the application is deployed on the application server.

In simplest terms web container provides one kind of framework /environment for the
execution of static components of JSP, servlets of an application.

JNDI (Java Naming & Directory Interface)


One of the crucial components of the Application servers which keeps track of all the
resources & Object present /connected to the Application. JNDI makes it possible for
application &/Application server components to find each other.

e.g

1. JNDI is just like card catalogs in a library which contains the location of books in
a library.
2. If web application request for specific connection information, it is JNDI who
locates & return the entire connection information to the application on the behalf
of Application server. And then application will contact to the database.
In an application server if any component want to have conversation / communication
with the other components then it will first locate that components through JNDI &
then will have a communication with them.

Lightweight Directory Access Protocol is the simplest example of the


implementation of JNDI in an organization which manages the users present in a
structural hierarchy.
EJB Container
In Simplest form most of the applications dynamic request will be served & processed
by the EJB container in an Application server.

An Enterprise JavaBeans (EJB) container provides a run-time environment for


enterprise beans within the application server. It acts as an intermediate between the
business logic of an application & rest of the application server environment.

It manages the allocation of resources to application objects in runtime environment


on which application server instance is installed.

JMS Messaging Container


JMS i.e. Java Message Service is particularly used to send & receive messages
between different enterprise application & its components. You can consider it as a
way of communication between different distributed application in an environment.

This communication is carried out by means of messages & these messages can be
either in form of reports, request or event that contains information needed to co-
ordinate the communication between different applications.

e.g. The best example of JMS implementation is Payment Gateways NEFT & RTGS
which operates completely on the requests/response in terms of messages.

There are two models for the JMS

1. Point to Point: In which there will be one to one communication or exchange of


information
2. Publish & Subscribe: In Which there will be channels on which publisher will
put his message & according to the need /requirement subscriber will subscribe to
that particular channel.
JDBC Manager
JDBC manager as name itself specifies manages the connection to the different
database. If your application stores /read the data/information to and from the
database then the target database connection will be managed by the JDBC manager.

JDBC manager will be responsible for managing the database resources such as data
sources information, connection pool configuration information & different tuning
parameter related database at application server level.

All the database related requests & response will be handled by the JDBC manager for
application server .While deploying the application you just have to use proper JDBC
driver for the related database. All application server supports major database vendors
such as Oracle Database,MS-sqlserver,Mysql,IBMs DB2 & SYBase etc…

I am doubtful about some of the unstructured database support on these application


server because until now I haven’t seen any implementation with these unstructured
databases such as MongoDB .

Transaction Manager
Transaction is logical unit of work & it will be either committed or roll-backed. So If
your applications environment contains references to different database vendors on
different machines or to multiple instances of same database for different
transactions, it requires someone to control the entire flow of transaction once an
application request comes for the particular database resource .

Therefore it’s transaction manager who decides whether to commit or rollback the
particular transaction.

For each database resource there will be a separate resource manager and these
resource managers communicates with the transaction manager. On the availability of
these resource manager ,transaction manager decides whether to commit the
transaction or not .That is the way Two –Phase Commit happens.

If any one resource manager is not available entire transaction will be rolled back.

Thread & Process monitoring control


This component will take care of threads allocation to the request coming from client
for application. Every application server has its own set of rules for how many threads
should be allocated to a single request from the end user.

Through this component you can have control on performance related configuration
for application at application server level. Using this component you can decide how
much time one thread should take to execute /complete the request. Also this
component is responsible for providing you complete stack of threads status & their
history.

I tried to give you a simple overview of application server .Hope you enjoyed this.

Keep following my blog & post doubts if you have.

Vous aimerez peut-être aussi