Datasheet

Apache and Jakarta Tomcat
9
In these situations, where a single server simply cannot meet the needs of a software system, a
distributed system is ideal. Multiple servers can work together to meet demands that a single server
could not.
But, why bother creating a distributed system? Why not just copy the same application and deploy it on
multiple servers? Surely load balancing – splitting up the requests amongst the different servers – can
then handle the load?
It turns out that by separating the different logical components of an application, system administrators
are free to tune the various components of the distributed system according to their unique needs. For
example, the servers that read and write to the database will require different optimizations than those
servers which are communicating with web clients via HTTP over TCP.
The J2EE APIs
Creating the distributed systems that we've described in the preceding paragraphs is not an easy task.
We mentioned a few paragraphs ago that J2EE is a collection of code libraries called APIs. The J2EE
APIs are designed to work together to simplify the creation of robust and efficient distributed systems.
Here is a list of some of the key J2EE technologies and a brief description of each:
J2EE API Description
Enterprise JavaBeans (EJB)
EJB technology provides a simple mechanism for
creating distributed business logic components. EJB
authors follow a simple pattern to write business
logic and the rest of the low-level details relating to
lifecycle, distribution, persistence, and so on are
handled automatically.
Java Message Service (JMS) JMS provides asynchronous messaging capability to
J2EE applications.
Java Naming and Directory Service (JNDI) JNDI enables J2EE applications to communicate
with registries and directories. A
registry/directory is a centralized location for
storing business information. JNDI supports the
industry standard LDAP protocol and interfaces
with many other popular registry standards. JNDI
makes it possible to centralize the configuration
of a distributed system.
Servlets As explained earlier in this chapter, servlets work
with special servers called servlet containers to
process HTTP requests and send HTTP responses.
Servlets often work directly with EJBs.
JavaServer Pages (JSP) JSP technology is an alternative, HTML-like
interface for creating servlets. At runtime, the servlet
container converts a JSP into a servlet.
Table continued on following page