Documente Academic
Documente Profesional
Documente Cultură
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.
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.
In simplest terms web container provides one kind of framework /environment for the
execution of static components of JSP, servlets of an application.
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.
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.
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…
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.
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.