Server User Manual

Table Of Contents
8 Developing Applications for J2EE Servers
Why are J2EE applications desirable?
Benefits of the multi-tier model
The multi-tier approach adopted by the J2EE platform has several benefits:
It reduces the complexity of distributed development with a simplified architecture
and the sharing of the work load among roles.
The business logic of the application runs in the middle tier inside an Enterprise
JavaBean (EJB) container and/or on a web server. These containers and servers
can handle many of the difficult tasks for developers. For example, an EJB container
can handle transactions, instance pooling, and data persistence without requiring
the EJB programmer to write the logic to perform these tasks. A web server can
create and pool instances of servlet classes and handle multiple threads and socket
connections. Instead of writing the code to do these things, a member of the
development team specifies the desired behavior at deployment time.
Members of the development team play different roles. Each is a specialist in one or
more areas. For example, the content of an HTML page or stylesheet would likely
be created by a graphic designer or webmaster. A senior developer might be
responsible for the business logic of the application encapsulated within Enterprise
JavaBean components. A web developer might develop the user interface and
presentation logic using JavaServer Pages (JSPs) and servlets. An application
assembler takes the various components of the application and puts it all together,
often creating an Enterprise Archive (EAR) file and creating the deployment
descriptor that explains how the application is to be deployed. The application
deployer and administrator deploy the application. By partitioning the work this way,
each step of the development/deployment process is handled by someone skilled in
their area while no one has to be an expert in every area.
It is highly scalable, allowing the development of systems to meet many different
needs that can change quickly.
When demands on the system increase, the logic can be updated easily in one
place on the middle tier without having to load new logic on every client machine.
New applications can integrate well with existing information systems.
JDBC, a J2EE technology, is a Java API to SQL databases, permitting the access to
any type of tabular data that might exist in the enterprise. The Java Naming and
Directory Interface (JNDI) allows applications that use Java technology to access
enterprise naming and directory services. The J2EE Connector architecture gives
Java applications connections to heterogeneous legacy systems. The Java
Message Service (JMS) is the Java API for sending and receiving messages though
enterprise messaging systems. CORBA services are called using JavaIDL.
Security is enhanced.
J2EE technologies are designed with security in mind. For example, only users in
assigned roles can access certain methods in enterprise beans. Who can access
these methods isnt coded in the enterprise beans themselves. Instead this
information is set in the enterprise beans deployment descriptors, which are used
by the deployer to establish their behavior after they are deployed. This type of
security is called declarative security.
For complex security requirements, however, J2EE also allows programmable
security. In these cases, the security logic is placed within the code itself.
Developers can choose from a variety of development tools, servers, and
components to develop the applications they need.
The development team can select the solutions that are best for their needs, without
becoming locked into the offerings of a single vendor.