• Describe what a distributed architecture consists of
• Learn how to create a distributed architecture
• Understand the J2EE API’s and how the relate distributed architectures
• Look at J2EE servers
• Startup WebLogic Server (WLS)
• Perform basic WLS administration functions
• Configure WLS using Administration Console
• Decode the WLS directory structure
• Introduce the vocabulary of working with WLS
• Understand JNDI
• Describe the two sides to JNDI
• Build a client that uses JNDI for a lookup
• Use WebLogic Servers JNDI support to make it simple
When Java first hit the market it was a language with much promise, and even more hype. It was a language
you could write applications with that was fast and easy, and it would run on any platform. As Java grew
up its strengths and weaknesses started to show through. Java’s primary strength has been the industry
support for Java. Sun with help from partners will define a specification and many companies will support
this specification making it a powerful unifier of many companies, operating systems and products. One of
the most important standards Sun has realized with Java is J2EE, or Java 2 Enterprise Edition. J2EE
provides a standard approach to developing enterprise applications.
In this chapter we will take a look at the concepts behind J2EE. We will see why J2EE is a good idea and
where you will see it and where you will use it. Not surprisingly J2EE is a very large specification that
includes many technologies, we will see many of those technologies in detail later. This chapter will focus on
an overview of the whole J2EE architecture.
• Java 2 Enterprise Edition is a specification of how to develop enterprise applications.
- Enterprise applications are applications that must be deployable in many different environments.
- J2EE includes many API’s including JDBC, EJB, JNDI, JSP and Servlets.
- J2EE supports integration into legacy information systems using CORBA.
• The J2EE specification makes creating middleware easier.
- Enterprise systems become very difficult because they include many different applications and systems
that need to be integrated.
- J2EE allows easier integration by providing a single standard that sits on top of existing transaction
monitors, database resources, lookup facilities and legacy code.
- J2EE provides rules and regulations that allow developers to create portable robust middleware that can
be transferred between systems.
• J2EE has industry momentum.
- Providing standards is of no use unless you get the industry leaders to follow.
- Sun has partnered with many other industry leaders such as IBM, BEA and many others; J2EE is one
of the most popular standards around.
• Why was J2EE created?
• Sun created J2EE in an effort to make it easier to create enterprise applications.
- Applications must be created quickly so you can remain competitive.
- Applications should be flexible and allow for easy growth/change.
- Applications should easily merge and utilize existing systems and applications.
- Applications should be able to utilize new and powerful technologies to make your applications better,
stronger and faster to create.
• J2EE makes creating enterprise applications easier by providing a standard way to make craft
- J2EE is flexible and can be applied to client server applications as well as internet, extranet or intranet
- The flexibility in J2EE allows you to craft traditional application logic and project it to emerging
• Before J2EE was rolled out you faced serious difficulty architecting intra/internet applications.
- Traditionally CGI is used to get access to backend databases, transaction monitors and legacy systems.
- HTML is used as the web-front end, but the HTML would commonly be created in the CGI code.
• The traditional web development model introduces many different programming models.
- Some of the programming models are based on well-defined standards such as ODBC or JDBC.
- Some of the models get by with ad-hoc standards.
- Some of the models use proprietary standards.
• Many applications need to support not only web clients. Many application need to support intranet
and desktop clients.
• Applications need the ability to scale with minimal architecture change. Features that you will need to
architect for include …
- Load Balancing
- Object and Connection Pooling
- Changing Server configurations
• You architecture can have the ability to change vendors. By providing a standard J2EE is supported by
many vendors allowing you to change what vendors you use.
• Security becomes a key issue when creating applications that support intranet or Internet access.
- No longer can you control the client installations, you need to expose you applications to the web.
- Security usually needs to allow your users to access sensitive data while maintaining tight security on
those same sensitive data.
• The J2EE platform provides standardized ways to create many different client access points for the
- A client could be a HTML making HTTP requests back to the server, where the HTML returned is
dynamically created using your Information system.
- A client could be an Applet downloaded into the browser communicating through HTTP or any other
protocol back to the web server.
- A client could be an installed application either inside or outside the firewall communicating with the
- The client could be an installed application accessing the Information System through some distributed
• J2EE realizes many of its flexibility by using the concept of a container.
• Containers provide standard services for components running within them.
- Servlet Containers provide servlet life cycle and request/response http interactions.
- J2EE Containers provide lookup and DB access using Java standards.
• Containers allow transfer of code from vendor to vendor. Each container is responsible for similar
functionality and minimal code changes are needed to transfer components from one container to another.
• Containers allow deploy time configuration. This allows you to move the container specific parts of a
component out of the code and into deployment descriptors.
• With J2EE we will be working with many different tiers of an application.
• The client tiers as we have already discussed can be represented by a number of technologies including
Swing, Servlets and JSP.
• The Middle tier will be used to create business logic components. J2EE uses Enterprise Java Beans
(EJB or EJBeans) to create this middle tier.
- EJB and J2EE are two specifications with the same end goal. You can think of EJB as one part of the
- EJB allows developers to create business logic components without concern for critical but difficult
- EJBeans deploy to an EJB container allowing you to describe configuration during deployment and to
move components from container to container.
- EJB containers automatically provide important services like security, transactions, and persistence.
- We will investigate more detail of EJB as we proceed through the class.
• J2EE is a standardization of distributed application development geared to make distributed
applications easier to develop.
- J2EE is a component-based spec, creating and configuring components leads to simpler pieces and code
- J2EE allows configuration changes when components are deployed, making components more flexible.
- J2EE supports a division of labor allowing people to specialize.
• J2EE applications can be scaled to meet demand. Containers can be configured to support pooling and
• J2EE uses standard Java API’s to communicate to legacy and other enterprise applications.
- JDBC: Database communication
- JTI: Java Transaction API
- JNDI: Java Naming and Directory Interface
- JMS: Java Messaging Service
- Java Mail
- Java IDL: Links Java to CORBA
• By creating a standard the J2EE provides a marketplace for Container vendors and Component Vendors.
• J2EE provides a universal security model to support sign on from any access point.
Advanced Java Tutorial | J2EE Tutorial | JEE Tutorial
Table of Contents
Copyright (c) 2008-2013. Intertech, Inc. All Rights Reserved. This information is to be used exclusively as an
online learning aid. Any attempts to copy, reproduce, or use for training is strictly prohibited.