Unit I J2EE Platform 9
Unit I J2EE Platform 9
Unit I J2EE Platform 9
J2EE Platform 9
INTRODUCTION
J2EE is a standard for building and deploying enterprise applications, held together by the
specifications of the APIs that it defines and the services that J2EE provides. In other words, this
means that the "write once, run anywhere" promises of Java apply for enterprise applications too:
Enterprise applications can be run on different platforms supporting the Java 2 platform.
Enterprise applications are portable between application servers supporting the J2EE
specification.
This chapter provides an overview of the architectural concepts upon which Java Enterprise
System deployments are based.
The standard architecture for distributed applications separates application logic into a number
of tiers. These tiers signify a logical and physical organization of components into an ordered
chain of service providers and consumers. Components within a tier typically consume the
services provided by components in an adjacent provider tier and provide services to one or more
components in an adjacent consumer tier.
Description of Logical Tiers
The descriptions, refer to components implemented using the Java 2 Platform, Enterprise
Edition (J2EE™ platform) component model. However, other distributed component models,
such as CORBA, also support this architecture.
Client Tier
The client tier consists of application logic accessed directly by an end user through a user
interface. The logic in the client tier could include browser-based clients, Java components
running on a desktop computer, or Java 2 Platform, Micro Edition (J2ME™ platform) mobile
clients running on a handheld device.
Presentation Tier
The presentation tier consists of application logic that prepares data for delivery to the client tier
and processes requests from the client tier for delivery to back-end business logic. The logic in
the presentation tier typically consists of J2EE components such as Java Servlet components or
JSP components that prepare data for HTML or XML delivery or that receive requests for
processing. This tier might also include a portal service that can provide personalized, secure,
and customized access to business services in the business service tier.
The business service tier consists of logic that performs the main functions of the application:
processing data, implementing business rules, coordinating multiple users, and managing
external resources such as databases or legacy systems. Typically, this tier consists of tightly
coupled components that conform to the J2EE distributed component model, such as EJB
components or message-driven beans (MDBs).
Data Tier
The data tier consists of data used by business logic. The data can be persistent application data
stored in a database management system or it can be resource and directory information stored in
a Lightweight Directory Access Protocol (LDAP) data store. The data can also include data feeds
from external sources or data accessible from legacy computing systems.
The services shown in the presentation and business service tiers are the centerpiece of this
model. These services are multi-threaded software processes capable of supporting large
numbers of clients. These clients can be either end-user clients or other services.
Logical independence
Physical independence.
Example of Tiered Architecture
The e-mail communication services provided by Messaging Server are an example of the use of
logical tiers in architectural design. E-mail services are implemented using a number of
Messaging Server components, as shown in the following figure.
[D]
Container
J2ee technology
Naming and Directory Concepts Start here to get an overview of naming and directory
concepts.
JNDI Overview Gives you an overview of JNDI, its architecture and packaging.
Software Setup Describes instructions and steps involved in setting an environment that is
required to run the examples described in this trail as well as any other JNDI application.
Naming and Directory Operations Describes various naming and directory operations and
demonstrates them through plenty of examples that access naming/directory services using JNDI.
Advanced Topics for LDAP users A specialized lesson for the LDAP users. It talks about
modeling JNDI as an LDAP API, how to perform LDAP authentication, SSL and managing
connections in production environments.
Accessing Objects in the Directory Shows you how to integrate your application with the
directory, so that you can store and retrieve Java objects to and from the directory.
Features in JDK 5.0 and JDK 6 Introduces to the features in the JNDI and the LDAP Service
Provider that are available in JDK 5.0 and JDK 6.
USING JNDI
JNDI directory-service support is both comprehensive and powerful. It adds advanced functions,
like storing and retrieving serialized class instances, to searching and other components of the
basic suite of direct functions. This month, we will pass on the advanced features and focus on
understanding basic JNDI directory functionality.
With this thought in mind, let's examine the DirContext class -- the heart of JNDI directory
services.
LDAP
The Lightweight Directory Access Protocol (LDAP) is an Internet standard for accessing
directory services. The JNDI/LDAP service provider provides access to servers implementing
the LDAP protocols.
LDAP OPERATIONS
ADD
BIND
MODIFY
DELETE
APPLICATION SERVER
An application server is a software framework that provides both facilities to create web
applications and a server environment to run them.
J2EE Platform being the runtime infrastructure within which enterprise applications are
deployed. The platform contains four containers, or runtime environments, each of which in turn
contains application components. You also saw that some of the services that J2EE demands
must be available to these components and that the components access the services using the
J2EE API.
A packaging specification is master data. The packaging specification defines all the necessary
packing levels for a product in order, for example, to put away or transport the product. For a
product, a packaging specification mainly describes in which quantities you can pack the product
into which packaging materials in which sequence.
Sun ONE Application Server 7, Enterprise Edition provides various J2EE containers in
compliance with the J2EE 1.3 specification. Containers provide runtime support for J2EE
application components such as Enterprise Java Beans (EJBs) and Message Driven Beans
(MDBs). MDBs and EJBs never interact directly with other J2EE application components. They
use the protocols and methods of the EJB container for interacting with each other and with
platform services, such as the Java Transaction Service. The container is interposed between
application components and J2EE services. This allows the container to transparently inject the
services defined by the components' deployment descriptors, such as declarative transaction
management, security checks, resource pooling, and state management.
Sun One Application Server incorporates the Web Container and the EJB Container.