responses. JSP pages are
text-based documents that execute as servlets but allow a more natural approach
to creating static content.
What is the container? - Containers are the interface between a component and the
low-level platform specific functionality that supports the component. Before a
Web, enterprise bean, or application client component can be executed, it must
be assembled into a J2EE application and deployed into its container.
What are container services? - A container is a runtime support of a system-level entity.
Containers provide components with services such as lifecycle management,
security, deployment, and threading.
What is the web container? - Servlet and JSP containers are collectively referred to as Web
containers. It manages the execution of JSP page and servlet components for
J2EE applications. Web components and their container run on the J2EE server.
What is Enterprise JavaBeans
(EJB) container? - It manages the execution of
enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
Enterprise beans and their container run on the J2EE server.
What is Applet container? - IManages the execution of applets. Consists of a Web browser and
Java Plugin running on the client together.
How do we package J2EE components? - J2EE components are packaged separately and bundled into a J2EE
application for deployment. Each component, its related files such as GIF and
HTML files or server-side utility classes, and a deployment descriptor are
assembled into a module and added to the J2EE application. A J2EE application
is composed of one or more enterprise bean,Web, or application client component
modules. The final enterprise solution can use one J2EE application or be made
up of two or more J2EE applications, depending on design requirements. A J2EE
application and each of its modules has its own deployment descriptor. A
deployment descriptor is an XML document with an .xml extension that describes
a component’s deployment settings.
What is a thin client? - A thin client is a lightweight interface to the application that
does not have such operations like query databases, execute complex business
rules, or connect to legacy applications.
What are types of J2EE
clients? - Following are the types of J2EE clients:
o Applets
o Application clients
o Java Web Start-enabled rich clients, powered by Java Web Start
technology.
o Wireless clients, based on Mobile Information Device Profile (MIDP)
technology.
What is deployment
descriptor? - A deployment descriptor is an
Extensible Markup Language (XML) text-based file with an .xml extension that
describes a component’s deployment settings. A J2EE application and each of its
modules has its own deployment descriptor. For example, an enterprise bean
module deployment descriptor declares transaction attributes and security
authorizations
for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly.
for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly.
What is the EAR file? - An EAR file is a standard JAR file with an .ear extension, named
from Enterprise ARchive file. A J2EE application with all of its modules is
delivered in EAR file.
What is JTA and JTS? - JTA is the abbreviation for the Java Transaction API. JTS is the
abbreviation for the Jave Transaction Service. JTA provides a standard
interface and allows you to demarcate transactions in a manner that is
independent of the transaction manager implementation. The J2EE SDK implements
the transaction manager with JTS. But your code doesn’t call the JTS methods
directly. Instead, it invokes the JTA methods, which then call the lower-level
JTS routines. Therefore, JTA is a high level transaction interface that your
application uses to control transaction. and JTS is a low level transaction
interface and ejb uses behind the scenes (client code doesn’t directly interact
with JTS. It is based on object transaction service(OTS) which is part of
CORBA.
What is JAXP? - JAXP stands for Java API for XML. XML is a language for
representing and describing text-based data which can be read and handled by
any program or tool that uses XML APIs. It provides standard services to
determine the type of an arbitrary piece of data, encapsulate access to it,
discover the operations available on it, and create the appropriate JavaBeans
component to perform those operations.
What is J2EE Connector? - The J2EE Connector API is used by J2EE tools vendors and system
integrators to create resource adapters that support access to enterprise
information systems that can be plugged into any J2EE product. Each type of
database or EIS has a different resource adapter. Note: A resource adapter is a
software component that allows J2EE application components to access and
interact with the underlying resource manager. Because a resource adapter is
specific to its resource manager, there is typically a different resource
adapter for each type of database or enterprise information system.
What is JAAP? - The Java Authentication and Authorization Service (JAAS) provides
a way for a J2EE application to authenticate and authorize a specific user or
group of users to run it. It is a standard Pluggable Authentication Module
(PAM) framework that extends the Java 2 platform security architecture to
support user-based authorization.
What is Java Naming and
Directory Service? - The JNDI provides naming and
directory functionality. It provides applications with methods for performing
standard directory operations, such as associating attributes with objects and
searching for objects using their attributes. Using JNDI, a J2EE application
can store and retrieve any type of named Java object. Because JNDI is
independent of any specific implementations, applications can use JNDI to
access multiple naming and directory services, including existing naming and
directory services such as LDAP, NDS, DNS, and NIS.
directory services such as LDAP, NDS, DNS, and NIS.
What is Struts? - A Web page development framework. Struts combines Java Servlets,
Java Server Pages, custom tags, and message resources into a unified framework.
It is a cooperative, synergistic platform, suitable for development teams,
independent developers, and everyone between.
How is the MVC design
pattern used in Struts framework? - In the MVC
design pattern, application flow is mediated by a central Controller. The
Controller delegates requests to an appropriate handler. The handlers are tied
to a Model, and each handler acts as an adapter between the request and the
Model. The Model represents, or encapsulates, an application’s business logic
or state. Control is usually then forwarded back through the Controller to the
appropriate View. The forwarding can be determined by consulting a set of
mappings, usually loaded from a database or configuration file. This provides a
loose coupling between the View and Model, which can make an application
significantly easier to create and maintain. Controller: Servlet controller
which supplied by Struts itself; View: what you can see on the screen, a JSP
page and presentation components; Model: System state and a business logic
JavaBeans.
A great deal has transpired in the Java space
since we first attended Java One in 1998. The latest batch of Java 2 Platform
Enterprise Edition (J2EE) 1.4 compliant application servers is strong proof of
the technological advancements that have taken place during this time period.
These server-side offerings adhere to the J2EE three-tier model, while
providing a solid foundation for deploying both Web services and
service-oriented architectures (SOAs). Regarding Web services, there are
currently two main development paths that include J2EE and .NET for creating
and deploying these types of services.
Each has garnered the support of industry
leaders. For example, J2EE has gained strong support from the Java community
(e.g., BEA, IBM, Oracle, Sun, etc.) and .NET spearheads the Web services effort
for Microsoft. While development paths may differ, the aforementioned vendors
have been strong proponents of Web services and open-standards that include
WSDL, ebXML/UDDI and SOAP.
The J2EE Multitiered Model
J2EE multitiered applications are usually
considered to be three-tiered applications because they are distributed over
three locations (client machine, J2EE server and database server or legacy
systems at the back end). It is important to note that although a J2EE application
may consist of three tiers (client tier, business tier and EIS tier) or four
tiers (client tier, Web tier, business tier and EIS tier), J2EE multitiered
applications are generally considered to be three applications. Application
logic is divided into components according to function. Accordingly, the
various application components that make up a J2EE application are installed on
different machines depending on the tier in the multitiered J2EE environment to
which the application belongs. The following are the three tiers that comprise
the J2EE multitiered model.
Advertisement
Client Machine (Client Tier)
The J2EE client tier is divided into two main
categories that include Web-based clients and application clients.
Web-based
client (a.k.a
thin client) executes in a standard Web browser such as Microsoft Internet
Explorer (IE) and Mozilla Firefox. A Web-based client is comprised of two main
parts that include: 1) dynamic Web pages containing various types of markup
languages (e.g., HTML, XML, etc.) which are generated by Web components (JSPs
and servlets) on the Web tier and 2) a Web browser which renders the pages
received from the server. Web-based clients typically do not execute complex
business rules, query databases and/or connect to legacy systems. Normally,
heavyweight operations are offloaded to Enterprise Java Beans (EJBs) executing
on the J2EE server where they may leverage the reliability, security and speed
of J2EE-server-side technologies.
Biggest Advantage: Available
on a majority of client machines (e.g., laptops, PCs, Tablet, etc.).
Biggest Disadvantage: Limited to the capabilities of HTML, JavaScript and other related Web-scripting languages.
Biggest Disadvantage: Limited to the capabilities of HTML, JavaScript and other related Web-scripting languages.
Application
clients are
Java applications that run in a Java virtual machine (JVM), and provide a way
for users to handle tasks that require a richer user interface (UI) that can be
provided by markup languages. Application clients can directly access EJBs
running on the business tier. Alternatively, if required, an application client
may also open an HTTP connection to establish communication with a servlet
running in the Web tier.
Biggest Advantage: Richer user
interface.
Biggest Disadvantage: Must be installed on each client machine.
Biggest Disadvantage: Must be installed on each client machine.
Web-based and application clients have their
own distinct benefits and drawbacks that must be taken into consideration
regarding the needs and requirements of the solution being deployed (e.g., CRM,
ECMS, ERP, etc.).
While these architectures are usually kept
distinct, there is another model that has not been much utilized, but which
presents some obvious advantages in a mix of these capabilities, both internal
to the enterprise and in its external-facing modalities. These are
application-specific runtimes that can be fairly limited additional extension
profiles to existing core markup mime typed plug-ins to augment UIs that travel
with the application from the Web tier to the Web-based client, where the
functionality is optionally added to the client's Web browser for the length of
runtime required by the application to take the processing load off the server
onto the client or that can be maintained as an addition to the browser's
plug-ins.
This model is characterized by specialized
viewers that have not found their way into markup standards for Web services as
yet, such as Macromedia Flash MX which has added forms management to its
feature set along with Adobe SVG Viewer for Lifecycle forms manager.
Heretofore, this model has been widely dropped in favor of server-based
processing, where the implementation of increased capacity is more predictable
and, therefore, more economically feasible than in the client.
However, consider the recent announcement of
an Outlook standalone subset available by subscription. This is an attempt by
Microsoft to see if such a modularization will fit its evolving
software-by-subscription service strategy. If Redmond is looking into this,
others will, too. Despite the fact that the aforementioned display technologies
are not now modularized to take advantage of this model, it seems likely that,
as seen in the Microsoft experiment cited above, the modularization of
software-by-subscription or in special-purpose, short-lived extensions that
travel with their application, modularization seems inevitable.
The monolithic single-vendor solution model
seems doomed in the face of open-source software based on open, public
standards. Open-source developers already have their offerings aligned with
this modularized model, by default largely since OSS does not lend itself to
monolithic, deliberately non-interoperable proprietary systems, and with its
availability and the advantages to the business world of eliminating
single-vendor locked-in dependence, this prediction of the demise of these
unwieldy, bloated leviathans certainly looks like the handwriting on the wall
in this arena. Regardless, there is currently an excess amount of processing
power going unused on the client side, and load-balancing considerations, as we
move into an era of greater processing asset utilization (grids) will
increasingly require moving the processing load onto the client, especially if
this capacity is kept to small and optionally short-lived profiles. Also, there
is a good chance that more modular architectures will find favor in a more
mix-and-match set of software functionalities as the post-Y2K IT environment
presents the necessity of adapting to a necessarily heterogeneous systems.
J2EE Server Machine (Web Tier and
Business Tier)
In basic terms, an application server is the
middleware that acts as the medium for a company's front-end applications
through its back-end business systems. It must be able to extract core data and
present it to a variety of clients (e.g., desktops, smart cards, Web browsers,
etc.). Application servers provide developers with the capability to build and
deploy Web application logic with data access through APIs. Leading cost-type
J2EE application server offerings include BEA WebLogic 8.1, IBM WebSphere V6,
Oracle Application Server 10g and Sun Java System Application Server. In
addition, there are a number of open-source J2EE application servers currently
available that include Apache Jakarta Tomcat, JBoss and Jonas. The following
are the core components and other key supporting server-side technologies that
comprise the J2EE server machine (Web tier and business tier).
Web Tier
J2EE Web components are either pages using
JSP technology (JSP pages) or servlets.
Advertisement
JSP: Java server pages
(JSP) are text-based documents that execute as servlets. A JSP page contains
two types of text that include:
·
Static Template Data: May be expressed in any
text-based format (e.g., HTML, WML, XML, etc.).
·
JSP Elements: Determine how a page constructs
dynamic content.
Servlets: Allow users to run
Java code on the server and send HTML pages to a browser. Java servlet
technology enables developers to define HTTP-specific servlet classes. As a
result, a servlet class extends the capabilities of servers, which host
applications that are accessed by way of a request-response programming model.
Business
Tier
Business code, which is logic that solves the
requirements or needs of a business entity (e.g., banking, brokerage,
insurance, etc.) is handled by Enterprise JavaBeans (EJB) running on the
business tier. EJB may be viewed server component architecture, which conform
to the Sun EJB component model. They can be used to create a business object
and related content may be sent using Java server pages (JSPs). Furthermore, an
EJB can receive data from a client program, process it (if required) and send
it to the EIS tier for storage or retrieve data from storage, process it (if
required), and send it back to the client program. There are three types on
EJBs that include session beans, entity beans and message-driven beans, and
brief descriptions of each follow:
·
Session Bean:A session
bean implements a conversation between a client and the server side. Session
beans execute a particular business task on behalf of a single client during a
single session.
·
Entity
Bean:An
entity bean represents a business object in a persistent storage mechanism.
Examples of business objects include customers, orders and products. In the
J2EE SDK, the persistent storage mechanism is a relational database. Typically,
each entity bean has an underlying table in a relational database, and each instance
of the bean corresponds to a row in that table.
·
Message
Driven Bean:A message-driven bean is an enterprise
bean that allows J2EE applications to process messages asynchronously. It acts
as a JMS message listener, which is similar to an event listener except that it
receives messages instead of events.
One of main benefits of entity beans is that
developers do not have to write SQL code or use the JDBC API directly to
perform database access operations because the EJB container handles this task.
Database Machine (EIS Tier)
Enterprise information systems (EIS) provide
the information infrastructure that is vital to the business processes of an
enterprise. The EIS tier handles software and includes enterprise
infrastructure systems such as ERP, mainframe transactions processing, database
systems and other related legacy systems. For example, J2EE application
components may require access to EIS for database connectivity. The database
plays a critical role in the storing and retrieving of information.
A database is a collection of data that is
organized so its contents may be accessed, managed and updated. The four main
types of databases include:
·
Distributed - Can be dispersed or
replicated among different points in a network.
·
Object Oriented - Is
congruent with data defined in object classes and subclasses.
·
Relational - A tabular design in
which data is defined so that it can be organized and accessed.
·
Object
Relational -
A combination of object and relational concepts where objects are mapped to
relational databases, often used to persist EJB.
At this time, relational databases are the
most prevalent type of offering. Leading relational database vendors include
IBM, Microsoft, Oracle and Sybase. These offerings support a wide range of
solutions that include business intelligence, collaboration, multimedia and
transactions processing. The database foundation for most businesses and
organizations deploying Web services and SOAs will most likely be based on a
two-tier architecture that is comprised of agency data marts and a central data
warehouse. This type database architecture provides four primary benefits that
include 1) high-speed access, 2) the ability to expand functionality both on
the data mart and/or
the central data warehouse levels without
reengineering the core architectural topology, 3) improved security, 4) a
360-degree perspective. The key components of the two-tier architecture are:
Data Mart. The data mart acts as
the information focal point regarding the activities of a specific entity
(e.g., local office, regional official, foreign office, etc.). It employs a
modular architecture that is comprised of individual data silos that are
directly coupled and synchronized with the entities software solutions (e.g.,
CRM, ECMS, ERP, etc.). A data silo methodology allows for faster access times
because a query is only performed against a specific section of the data mart
and does not have to search the entire data mart for the targeted information.
Security is greatly improved because data silos house only information on
specific types of solutions, so access can be implemented on a finer level of
granularity. The information held in the data mart, and or data marts may then
be sent to the central data warehouse on a scheduled basis chosen by the
business or organization.
The Central Data Warehouse. The central data
warehouse acts as the main repository and focal point for all data mart
information. Each data mart is directly coupled and synchronized with the
central data warehouse. The information housed in the central data warehouse
provides the authorized user with a 360-degree perspective of the entire
workings of the enterprise. For example, this holistic view enables the
business or organizations to better leverage business intelligence tools (BI) to
look for hidden trends and other previously unknown information within the
data.
The chosen database foundation should
leverage important open-standards such as extensible markup language (XML) for
internal as well as external applications; hence, the need to create the proper
infrastructure to support this essential technology. The ability to store and
retrieve XML documents in their native format will be of paramount importance
to businesses and organizations deploying Web services and SOAs.
Over the near term, the database landscape
and the J2EE architecture that supports and relies upon it are changing
rapidly. As the expanding parameters, which are blurring the differences, of
what constitutes a thick or thin, Web-based or application client, so also in
the realm of data; the only certain demand in the marketplace is for
flexibility, adaptability and quick responses.
ADVERTISEMENT
In a recent article, we wrote on the topic of integrated
development environments (IDE), we discovered that in the midst of a burgeoning
of application server choices there has been an unexpected development of a
relatively simplified set of platforms that are organized along lines so similar
as to be nearly identical. NetBeans looks like Eclipse without the XML
emphasis. This is also true of development environments for building OWL-based
ontological resources, such as Protégé and applications such as inference engines to
build semantically viable knowledge bases out of data collections. The fact is
that this makes increasing modularization almost inevitable.
The advent of object and object-relational
databases will only accelerate this process as business learns how to optimize
the functionalities used most, especially through SOA components, which are
likely to be housed in object or object-relational database repositories. The
essence of building a competitive advantage in the near term is going to be
building the most effective market-response systems, and the key to that will
lie in organizing, accessing data with a BI toolset that quickly transforms
data into useful information for timely or critical decision making.

Example 1: Application Client Directly Accessing EJBs Running on the Business Tier

Example 2: Application CLient Using an Open HTTP Connection to Establish Communication with a Servlet Running in th Web Tier
J2EE Development Tools
An integrated development environment or IDE
is a programming environment developed to produce reasonably standard
applications within a specific programming language or platform such as C++,
Java, Java++, C#, etc., on Windows, Linux and Macintosh operating systems. It
enables developers to more easily and consistently create applications that are
meant to satisfy specific needs and or requirements. This is facilitated
because, as much as possible, IDEs organize application-specific coding into
modules or units automatically within an overall governing structure called a
"project" as opposed to requiring a programmer to organize the myriad
code files and resources, such as DLLs, and build programs manually. These
applications share a common structure, with their various resources and
directories organized into more or less standard patterns. They are considered
integrated because the source code components are packaged in one unit for
delivery to the end user. This means that the end user only needs to click on a
setup or installer icon to install the software. These end products can be
tailored for specific versions of hardware platforms and operating systems
meant to run these applications. IDEs have become far more sophisticated during
the last three years and provide rich functionality across many languages and
technologies.
Leading Java IDE offerings include: Borland
Software Platform for J2EE, IBM WebSphere Studio V5.1.2, Oracle JDeveloper 10g,
Sun Studio Enterprise and Sybase PowerBuilder 10. There is also the ubiquitous,
now open-sourced Eclipse 3.0 platform that IBM has converted to pure XML and
can output Java, and Sun's contribution to the open source community, the
NetBeans IDE, which, while not currently devoted to pure XML, can be used with
Eclipse to reverse engineer into XML.
The Challenges
High-end cost-type J2EE application servers
support a number of core enterprise requirements, which include superior
availability, reliability, scalability and security. In addition, they provide
a wide-range of features and functions that support the needs of large-scale
environments. Typically, high-end J2EE application servers from BEA, IBM,
Oracle, Sun and Sybase range in price from $10,000 to $20,000 per-processor.
Careful assessment is required because price is not the greatest differentiator
regarding these types of middleware offerings. J2EE certification and
open-standards support should be viewed as the two most important core
elements. These factors go a long way in determining the features and functions
provided by a specific application server. For example, the Java API for
XML-based RPC (JAX-RPC) released as part of Sun's of J2EE 1.4 is used to build
Web applications and Web services, incorporating XML-based RPC functionality
according to the simple object access protocol (SOAP) 1.1 specification. While
JAX-RPC is most often associated with building Web applications on the Java
platform, it may also be used for Web services interoperability across
heterogeneous platforms and languages. For that reason, JAX-RPC can be
considered a key technology for Web services integration. As a result, business
and organizations currently face two main challenges in developing and
deploying traditional and Web services application that include 1) application
server capabilities, 2) development tool capabilities. What follows are brief
summaries of these two main challenges.
Java 2 Platform, Enterprise
Edition (J2EE) Overview
|
No comments:
Post a Comment