Foreword

About This Tutorial

Who Should Use This Tutorial

Prerequisites

How to Read This Tutorial

About the Examples

Further Information

How to Print This Tutorial

Typographical Conventions

Acknowledgments

Feedback

Chapter 1:   Overview

Distributed Multitiered Applications

J2EE Components

J2EE Clients

Web Components

Business Components

Enterprise Information System Tier

J2EE Containers

Container Services

Container Types

Web Services Support

XML

SOAP Transport Protocol

WSDL Standard Format

UDDI and ebXML Standard Formats

Packaging

Development Roles

J2EE Product Provider

Tool Provider

Application Component Provider

Application Assembler

Application Deployer and Administrator

J2EE 1.4 APIs

Enterprise JavaBeans Technology

Java Servlet Technology

JavaServer Pages Technology

Java Message Service API

Java Transaction API

JavaMail API

JavaBeans Activation Framework

Java API for XML Processing

Java API for XML-Based RPC

SOAP with Attachments API for Java

Java API for XML Registries

J2EE Connector Architecture

JDBC API

Java Naming and Directory Interface

Java Authentication and Authorization Service

Simplified Systems Integration

Sun Java System Application Server Platform Edition 8

Technologies

Tools

Starting and Stopping the Application Server

Starting the Admin Console

Starting the deploytool Utility

Starting and Stopping the PointBase Database Server

Debugging J2EE Applications

Chapter 2:   Understanding XML

Introduction to XML

What Is XML?

Why Is XML Important?

How Can You Use XML?

Generating XML Data

Writing a Simple XML File

Defining the Root Element

Writing Processing Instructions

Introducing an Error

Substituting and Inserting Text

Creating a Document Type Definition

Documents and Data

Defining Attributes and Entities in the DTD

Referencing Binary Entities

Defining Parameter Entities and Conditional Sections

Resolving a Naming Conflict

Using Namespaces

Designing an XML Data Structure

Saving Yourself Some Work

Attributes and Elements

Normalizing Data

Normalizing DTDs

Summary

Chapter 3:   Getting Started with Web Applications

Web Application Life Cycle

Web Modules

Packaging Web Modules

Deploying Web Modules

Listing Deployed Web Modules

Updating Web Modules

Undeploying Web Modules

Configuring Web Applications

Mapping URLs to Web Components

Declaring Welcome Files

Setting Initialization Parameters

Mapping Errors to Error Screens

Declaring Resource References

Duke's Bookstore Examples

Accessing Databases from Web Applications

Populating the Example Database

Creating a Data Source in the Application Server

Specifying a Web Application's Resource Reference

Mapping the Resource Reference to a Data Source

Further Information

Chapter 4:   Java API for XML Processing

The JAXP APIs

An Overview of the Packages

The Simple API for XML (SAX) APIs

The SAX Packages

The Document Object Model (DOM) APIs

The DOM Packages

The Extensible Stylesheet Language Transformations (XSLT) APIs

The XSLT Packages

Using the JAXP Libraries

Where Do You Go from Here?

Chapter 5:   Simple API for XML

When to Use SAX

Echoing an XML File with the SAX Parser

Creating the Skeleton

Importing Classes

Setting Up for I/O

Implementing the ContentHandler Interface

Setting up the Parser

Writing the Output

Spacing the Output

Handling Content Events

Compiling and Running the Program

Checking the Output

Identifying the Events

Compressing the Output

Inspecting the Output

Documents and Data

Adding Additional Event Handlers

Identifying the Document's Location

Handling Processing Instructions

Summary

Handling Errors with the Nonvalidating Parser

Displaying Special Characters and CDATA

Handling Special Characters

Handling Text with XML-Style Syntax

Handling CDATA and Other Characters

Parsing with a DTD

DTD's Effect on the Nonvalidating Parser

Tracking Ignorable Whitespace

Cleanup

Empty Elements, Revisited

Echoing Entity References

Echoing the External Entity

Summarizing Entities

Choosing Your Parser Implementation

Using the Validating Parser

Configuring the Factory

Validating with XML Schema

Experimenting with Validation Errors

Error Handling in the Validating Parser

Parsing a Parameterized DTD

DTD Warnings

Handling Lexical Events

How the LexicalHandler Works

Working with a LexicalHandler

Using the DTDHandler and EntityResolver

The DTDHandler API

The EntityResolver API

Further Information

Chapter 6:   Document Object Model

When to Use DOM

Documents Versus Data

Mixed-Content Model

A Simpler Model

Increasing the Complexity

Choosing Your Model

Reading XML Data into a DOM

Creating the Program

Additional Information

Looking Ahead

Displaying a DOM Hierarchy

Convert DomEcho to a GUI App

Create Adapters to Display the DOM in a JTree

Finishing Up

Examining the Structure of a DOM

Displaying a Simple Tree

Displaying a More Complex Tree

Finishing Up

Constructing a User-Friendly JTree from a DOM

Compressing the Tree View

Acting on Tree Selections

Handling Modifications

Finishing Up

Creating and Manipulating a DOM

Obtaining a DOM from the Factory

Normalizing the DOM

Other Operations

Finishing Up

Validating with XML Schema

Overview of the Validation Process

Configuring the DocumentBuilder Factory

Validating with Multiple Namespaces

Further Information

Chapter 7:   Extensible Stylesheet Language Transformations

Introducing XSL, XSLT and XPath

The JAXP Transformation Packages

How XPath Works

XPath Expressions

The XSLT/XPath Data Model

Templates and Contexts

Basic XPath Addressing

Basic XPath Expressions

Combining Index Addresses

Wildcards

Extended-Path Addressing

XPath Data Types and Operators

String-Value of an Element

XPath Functions

Summary

Writing Out a DOM as an XML File

Reading the XML

Creating a Transformer

Writing the XML

Writing Out a Subtree of the DOM

Summary

Generating XML from an Arbitrary Data Structure

Creating a Simple File

Creating a Simple Parser

Modifying the Parser to Generate SAX Events

Using the Parser as a SAXSource

Doing the Conversion

Transforming XML Data with XSLT

Defining a Simple <article> Document Type

Creating a Test Document

Writing an XSLT Transform

Processing the Basic Structure Elements

Writing the Basic Program

Trimming the Whitespace

Processing the Remaining Structure Elements

Process Inline (Content) Elements

Printing the HTML

What Else Can XSLT Do?

Transforming from the Command Line with Xalan

Concatenating Transformations with a Filter Chain

Writing the Program

Understanding How the Filter Chain Works

Testing the Program

Conclusion

Further Information

Chapter 8:   Building Web Services with JAX-RPC

Setting the Port

Creating a Simple Web Service and Client with JAX-RPC

Coding the Service Endpoint Interface and Implementation Class

Building the Service

Packaging the Service

Specifying the Endpoint Address

Deploying the Service

Static Stub Client

Types Supported by JAX-RPC

J2SE SDK Classes

Primitives

Arrays

Value Types

JavaBeans Components

Web Service Clients

Dynamic Proxy Client

Dynamic Invocation Interface (DII) Client

Application Client

More JAX-RPC Clients

Web Services Interoperability (WS-I) and JAX-RPC

Further Information

Chapter 9:   SOAP with Attachments API for Java

Overview of SAAJ

Messages

Connections

Tutorial

Creating and Sending a Simple Message

Adding Content to the Header

Adding Content to the SOAPPart Object

Adding a Document to the SOAP Body

Manipulating Message Content Using SAAJ or DOM APIs

Adding Attachments

Adding Attributes

Using SOAP Faults

Code Examples

Request.java

MyUddiPing.java

HeaderExample.java

DOMExample.java and DOMSrcExample.java

Attachments.java

SOAPFaultTest.java

Further Information

Chapter 10:   Java API for XML Registries

Overview of JAXR

What Is a Registry?

What Is JAXR?

JAXR Architecture

Implementing a JAXR Client

Establishing a Connection

Querying a Registry

Managing Registry Data

Using Taxonomies in JAXR Clients

Running the Client Examples

Before You Compile the Examples

Compiling the Examples

Running the Examples

Using JAXR Clients in J2EE Applications

Coding the Application Client: MyAppClient.java

Coding the PubQuery Session Bean

Compiling the Source Files

Importing Certificates

Starting the Application Server

Creating JAXR Resources

Creating and Packaging the Application

Deploying the Application

Running the Application Client

Further Information

Chapter 11:   Java Servlet Technology

What Is a Servlet?

The Example Servlets

Troubleshooting

Servlet Life Cycle

Handling Servlet Life-Cycle Events

Handling Errors

Sharing Information

Using Scope Objects

Controlling Concurrent Access to Shared Resources

Accessing Databases

Initializing a Servlet

Writing Service Methods

Getting Information from Requests

Constructing Responses

Filtering Requests and Responses

Programming Filters

Programming Customized Requests and Responses

Specifying Filter Mappings

Invoking Other Web Resources

Including Other Resources in the Response

Transferring Control to Another Web Component

Accessing the Web Context

Maintaining Client State

Accessing a Session

Associating Objects with a Session

Session Management

Session Tracking

Finalizing a Servlet

Tracking Service Requests

Notifying Methods to Shut Down

Creating Polite Long-Running Methods

Further Information

Chapter 12:   JavaServer Pages Technology

What Is a JSP Page?

Example

The Example JSP Pages

The Life Cycle of a JSP Page

Translation and Compilation

Execution

Creating Static Content

Response and Page Encoding

Creating Dynamic Content

Using Objects within JSP Pages

Expression Language

Deactivating Expression Evaluation

Using Expressions

Variables

Implicit Objects

Literals

Operators

Reserved Words

Examples

Functions

JavaBeans Components

JavaBeans Component Design Conventions

Creating and Using a JavaBeans Component

Setting JavaBeans Component Properties

Retrieving JavaBeans Component Properties

Using Custom Tags

Declaring Tag Libraries

Including the Tag Library Implementation

Reusing Content in JSP Pages

Transferring Control to Another Web Component

jsp:param Element

Including an Applet

Setting Properties for Groups of JSP Pages

Further Information

Chapter 13:   JavaServer Pages Documents

The Example JSP Document

Creating a JSP Document

Declaring Tag Libraries

Including Directives in a JSP Document

Creating Static and Dynamic Content

Using the jsp:root Element

Using the jsp:output Element

Identifying the JSP Document to the Container

Chapter 14:   JavaServer Pages Standard Tag Library

The Example JSP Pages

Using JSTL

Tag Collaboration

Core Tag Library

Variable Support Tags

Flow Control Tags

URL Tags

Miscellaneous Tags

XML Tag Library

Core Tags

Flow Control Tags

Transformation Tags

Internationalization Tag Library

Setting the Locale

Messaging Tags

Formatting Tags

SQL Tag Library

query Tag Result Interface

Functions

Further Information

Chapter 15:   Custom Tags in JSP Pages

What Is a Custom Tag?

The Example JSP Pages

Types of Tags

Tags with Attributes

Tags with Bodies

Tags That Define Variables

Communication between Tags

Encapsulating Reusable Content Using Tag Files

Tag File Location

Tag File Directives

Evaluating Fragments Passed to Tag Files

Examples

Tag Library Descriptors

Top-Level Tag Library Descriptor Elements

Declaring Tag Files

Declaring Tag Handlers

Declaring Tag Attributes for Tag Handlers

Declaring Tag Variables for Tag Handlers

Programming Simple Tag Handlers

Including Tag Handlers in Web Applications

How Is a Simple Tag Handler Invoked?

Tag Handlers for Basic Tags

Tag Handlers for Tags with Attributes

Tag Handlers for Tags with Bodies

Tag Handlers for Tags That Define Variables

Cooperating Tags

Examples

Chapter 16:   Scripting in JSP Pages

The Example JSP Pages

Using Scripting

Disabling Scripting

Declarations

Initializing and Finalizing a JSP Page

Scriptlets

Expressions

Programming Tags That Accept Scripting Elements

TLD Elements

Tag Handlers

Tags with Bodies

Cooperating Tags

Tags That Define Variables

Chapter 17:   JavaServer Faces Technology

JavaServer Faces Technology Benefits

What Is a JavaServer Faces Application?

Framework Roles

A Simple JavaServer Faces Application

Steps in the Development Process

Creating the Pages

Defining Page Navigation

Developing the Beans

Adding Managed Bean Declarations

User Interface Component Model

The User Interface Component Classes

The Component Rendering Model

Conversion Model

Event and Listener Model

Validation Model

Navigation Model

Backing Bean Management

How the Pieces Fit Together

The Life Cycle of a JavaServer Faces Page

Request Processing Life Cycle Scenarios

Standard Request Processing Life Cycle

Further Information

Chapter 18:   Using JavaServer Faces Technology in JSP Pages

The Example JavaServer Faces Application

Setting Up a Page

Using the Core Tags

Using the HTML Component Tags

UI Component Tag Attributes

The UIForm Component

The UIColumn Component

The UICommand Component

The UIData Component

The UIGraphic Component

The UIInput and UIOutput Components

The UIPanel Component

The UISelectBoolean Component

The UISelectMany Component

The UIMessage and UIMessages Components

The UISelectOne Component

UISelectItem, UISelectItems, and UISelectItemGroup

Using Localized Messages

Referencing a ResourceBundle from a Page

Referencing a Localized Message

Using the Standard Converters

Using DateTimeConverter

Using NumberConverter

Registering Listeners on Components

Registering a ValueChangeListener on a Component

Registering an ActionListener on a Component

Using the Standard Validators

Requiring a Value

Using the LongRangeValidator

Binding Component Values and Instances to External Data Sources

Binding a Component Value to a Property

Binding a Component Value to an Implicit Object

Binding a Component Instance to a Bean Property

Referencing a Backing Bean Method

Referencing a Method That Performs Navigation

Referencing a Method That Handles an ActionEvent

Referencing a Method That Performs Validation

Referencing a Method That Handles a ValueChangeEvent

Using Custom Objects

Using a Custom Converter

Using a Custom Validator

Using a Custom Component

Chapter 19:   Developing with JavaServer Faces Technology

Writing Component Properties

Writing Properties Bound to Component Values

Writing Properties Bound to Component Instances

Performing Localization

Creating a Resource Bundle

Localizing Dynamic Data

Localizing Messages

Creating a Custom Converter

Implementing an Event Listener

Creating a Custom Validator

Implement the Validator Interface

Creating a Custom Tag

Writing Backing Bean Methods

Writing a Method to Handle Navigation

Writing a Method to Handle an ActionEvent

Writing a Method to Perform Validation

Writing a Method to Handle a Value-Change Event

Chapter 20:   Creating Custom UI Components

Determining Whether You Need a Custom Component or Renderer

When to Use a Custom Component

When to Use a Custom Renderer

Component, Renderer, and Tag Combinations

Understanding the Image Map Example

Why Use JavaServer Faces Technology to Implement an Image Map?

Understanding the Rendered HTML

Understanding the JSP Page

Configuring Model Data

Summary of the Application Classes

Steps for Creating a Custom Component

Creating the Component Tag Handler

Defining the Custom Component Tag in a Tag Library Descriptor

Creating Custom Component Classes

Performing Encoding

Performing Decoding

Enabling Value-Binding of Component Properties

Saving and Restoring State

Delegating Rendering to a Renderer

Create the Renderer Class

Identify the Renderer Type

Handling Events for Custom Components

Chapter 21:   Configuring JavaServer Faces Applications

Application Configuration Resource File

Configuring Beans

Using the managed-bean Element

Initializing Properties using the managed-property Element

Initializing Maps and Lists

Registering Messages

Registering a Custom Validator

Registering a Custom Converter

Configuring Navigation Rules

Registering a Custom Renderer with a Render Kit

Registering a Custom Component

Basic Requirements of a JavaServer Faces Application

Configuring an Application Using deploytool

Including the Required JAR Files

Including the Classes, Pages, and Other Resources

Chapter 22:   Internationalizing and Localizing Web Applications

Java Platform Localization Classes

Providing Localized Messages and Labels

Establishing the Locale

Setting the Resource Bundle

Retrieving Localized Messages

Date and Number Formatting

Character Sets and Encodings

Character Sets

Character Encoding

Further Information

Chapter 23:   Enterprise Beans

What Is an Enterprise Bean?

Benefits of Enterprise Beans

When to Use Enterprise Beans

Types of Enterprise Beans

What Is a Session Bean?

State Management Modes

When to Use Session Beans

What Is an Entity Bean?

What Makes Entity Beans Different from Session Beans?

Container-Managed Persistence

When to Use Entity Beans

What Is a Message-Driven Bean?

What Makes Message-Driven Beans Different from Session and Entity Beans?

When to Use Message-Driven Beans

Defining Client Access with Interfaces

Remote Clients

Local Clients

Local Interfaces and Container-Managed Relationships

Deciding on Remote or Local Access

Web Service Clients

Method Parameters and Access

The Contents of an Enterprise Bean

Naming Conventions for Enterprise Beans

The Life Cycles of Enterprise Beans

The Life Cycle of a Stateful Session Bean

The Life Cycle of a Stateless Session Bean

The Life Cycle of an Entity Bean

The Life Cycle of a Message-Driven Bean

Further Information

Chapter 24:   Getting Started with Enterprise Beans

Creating the J2EE Application

Creating the Enterprise Bean

Coding the Enterprise Bean

Compiling the Source Files

Packaging the Enterprise Bean

Creating the Application Client

Coding the Application Client

Compiling the Application Client

Packaging the Application Client

Specifying the Application Client's Enterprise Bean Reference

Creating the Web Client

Coding the Web Client

Compiling the Web Client

Packaging the Web Client

Specifying the Web Client's Enterprise Bean Reference

Mapping the Enterprise Bean References

Specifying the Web Client's Context Root

Deploying the J2EE Application

Running the Application Client

Running the Web Client

Modifying the J2EE Application

Modifying a Class File

Adding a File

Modifying a Deployment Setting

Chapter 25:   Session Bean Examples

The CartBean Example

Session Bean Class

Home Interface

Remote Interface

Helper Classes

Building the CartBean Example

Creating the Application

Packaging the Enterprise Bean

Packaging the Application Client

A Web Service Example: HelloServiceBean

Web Service Endpoint Interface

Stateless Session Bean Implementation Class

Building HelloServiceBean

Building the Web Service Client

Running the Web Service Client

Other Enterprise Bean Features

Accessing Environment Entries

Comparing Enterprise Beans

Passing an Enterprise Bean's Object Reference

Using the Timer Service

Creating Timers

Canceling and Saving Timers

Getting Timer Information

Transactions and Timers

The TimerSessionBean Example

Building TimerSessionBean

Handling Exceptions

Chapter 26:   Bean-Managed Persistence Examples

The SavingsAccountBean Example

Entity Bean Class

Home Interface

Remote Interface

Running the SavingsAccountBean Example

Mapping Table Relationships for Bean-Managed Persistence

One-to-One Relationships

One-to-Many Relationships

Many-to-Many Relationships

Primary Keys for Bean-Managed Persistence

The Primary Key Class

Primary Keys in the Entity Bean Class

Getting the Primary Key

deploytool Tips for Entity Beans with Bean-Managed Persistence

Chapter 27:   Container-Managed Persistence Examples

Overview of the RosterApp Application

The PlayerBean Code

Entity Bean Class

Local Home Interface

Local Interface

Method Invocations in RosterApp

Creating a Player

Adding a Player to a Team

Removing a Player

Dropping a Player from a Team

Getting the Players of a Team

Getting a Copy of a Team's Players

Finding the Players by Position

Getting the Sports of a Player

Building and Running the RosterApp Example

Creating the Database Tables

Creating the Data Source

Capturing the Table Schema

Building the Enterprise Beans

Creating the Enterprise Application

Packaging the Enterprise Beans

Packaging the Enterprise Application Client

Deploying the Enterprise Application

Running the Client Application

A Guided Tour of the RosterApp Settings

RosterApp

RosterClient

RosterJAR

TeamJAR

Primary Keys for Container-Managed Persistence

The Primary Key Class

Advanced CMP Topics: The OrderApp Example

Structure of OrderApp

Bean Relationships in OrderApp

Primary Keys in OrderApp's Entity Beans

Entity Bean Mapped to More Than One Database Table

Finder and Selector Methods

Using Home Methods

Cascade Deletes in OrderApp

BLOB and CLOB Database Types in OrderApp

Building and Running the OrderApp Example

deploytool Tips for Entity Beans with Container-Managed Persistence

Selecting the Persistent Fields and Abstract Schema Name

Defining EJB QL Queries for Finder and Select Methods

Defining Relationships

Creating the Database Tables at Deploy Time in deploytool

Chapter 28:   A Message-Driven Bean Example

Example Application Overview

The Application Client

The Message-Driven Bean Class

The onMessage Method

The ejbCreate and ejbRemove Methods

Deploying and Running SimpleMessageApp

Creating the Administered Objects

Deploying the Application

Running the Client

Removing the Administered Objects

deploytool Tips for Message-Driven Beans

Specifying the Bean's Type

Setting the Message-Driven Bean's Characteristics

deploytool Tips for Components That Send Messages

Setting the Resource References

Setting the Message Destination References

Setting the Message Destinations

Chapter 29:   Enterprise JavaBeans Query Language

Terminology

Simplified Syntax

Example Queries

Simple Finder Queries

Finder Queries That Navigate to Related Beans

Finder Queries with Other Conditional Expressions

Select Queries

Full Syntax

BNF Symbols

BNF Grammar of EJB QL

FROM Clause

Path Expressions

WHERE Clause

SELECT Clause

ORDER BY Clause

EJB QL Restrictions

Chapter 30:   Transactions

What Is a Transaction?

Container-Managed Transactions

Transaction Attributes

Rolling Back a Container-Managed Transaction

Synchronizing a Session Bean's Instance Variables

Compiling the BankBean Example

Packaging the BankBean Example

Methods Not Allowed in Container-Managed Transactions

Bean-Managed Transactions

JDBC Transactions

Deploying and Running the WarehouseBean Example

Compiling the WarehouseBean Example

Packaging the WarehouseBean Example

JTA Transactions

Deploying and Running the TellerBean Example

Compiling the TellerBean Example

Packaging the TellerBean Example

Returning without Committing

Methods Not Allowed in Bean-Managed Transactions

Summary of Transaction Options for Enterprise Beans

Transaction Timeouts

Isolation Levels

Updating Multiple Databases

Transactions in Web Components

Chapter 31:   Resource Connections

JNDI Naming

DataSource Objects and Connection Pools

Database Connections

Coding a Database Connection

Specifying a Resource Reference

Creating a Data Source

Mail Session Connections

Running the ConfirmerBean Example

URL Connections

Running the HTMLReaderBean Example

Further Information

Chapter 32:   Security

Overview

Realms, Users, Groups, and Roles

Managing Users

Setting Up Security Roles

Mapping Roles to Users and Groups

Web-Tier Security

Protecting Web Resources

Setting Security Requirements Using deploytool

Specifying a Secure Connection

Using Programmatic Security in the Web Tier

Understanding Login Authentication

Using HTTP Basic Authentication

Using Form-Based Authentication

Using Client-Certificate Authentication

Using Mutual Authentication

Using Digest Authentication

Configuring Authentication

Example: Using Form-Based Authentication

Installing and Configuring SSL Support

What Is Secure Socket Layer Technology?

Understanding Digital Certificates

Configuring the SSL Connector

XML and Web Services Security

Example: Basic Authentication with JAX-RPC

Example: Client-Certificate Authentication over HTTP/SSL with JAX-RPC

EJB-Tier Security

Declaring Method Permissions

Configuring IOR Security

Using Programmatic Security in the EJB Tier

Unauthenticated User Name

Application Client-Tier Security

EIS-Tier Security

Container-Managed Sign-On

Component-Managed Sign-On

Configuring Resource Adapter Security

Propagating Security Identity

Configuring a Component's Propagated Security Identity

Configuring Client Authentication

What Is Java Authorization Contract for Containers?

Further Information

Chapter 33:   The Java Message Service API

Overview

What Is Messaging?

What Is the JMS API?

When Can You Use the JMS API?

How Does the JMS API Work with the J2EE Platform?

Basic JMS API Concepts

JMS API Architecture

Messaging Domains

Message Consumption

The JMS API Programming Model

Administered Objects

Connections

Sessions

Message Producers

Message Consumers

Messages

Exception Handling

Writing Simple JMS Client Applications

A Simple Example of Synchronous Message Receives

A Simple Example of Asynchronous Message Consumption

Running JMS Client Programs on Multiple Systems

Creating Robust JMS Applications

Using Basic Reliability Mechanisms

Using Advanced Reliability Mechanisms

Using the JMS API in a J2EE Application

Using Session and Entity Beans to Produce and to Synchronously Receive Messages

Using Message-Driven Beans

Managing Distributed Transactions

Using the JMS API with Application Clients and Web Components

Further Information

Chapter 34:   J2EE Examples Using the JMS API

A J2EE Application That Uses the JMS API with a Session Bean

Writing the Application Components

Creating and Packaging the Application

Deploying the Application

Running the Application Client

A J2EE Application That Uses the JMS API with an Entity Bean

Overview of the Human Resources Application

Writing the Application Components

Creating and Packaging the Application

Deploying the Application

Running the Application Client

An Application Example That Consumes Messages from a Remote J2EE Server

Overview of the Applications

Writing the Application Components

Creating and Packaging the Applications

Deploying the Applications

Running the Application Client

An Application Example That Deploys a Message-Driven Bean on Two J2EE Servers

Overview of the Applications

Writing the Application Components

Creating and Packaging the Applications

Deploying the Applications

Running the Application Client

Chapter 35:   The Coffee Break Application

Common Code

JAX-RPC Coffee Supplier Service

Service Interface

Service Implementation

Publishing the Service in the Registry

Deleting the Service From the Registry

SAAJ Coffee Supplier Service

SAAJ Client

SAAJ Service

Coffee Break Server

JSP Pages

JavaBeans Components

RetailPriceListServlet

JavaServer Faces Version of Coffee Break Server

JSP Pages

JavaBeans Components

Resource Configuration

Building, Packaging, Deploying, and Running the Application

Setting the Port

Setting Up the Registry Server

Using the Provided WARs

Building the Common Classes

Building, Packaging, and Deploying the JAX-RPC Service

Building, Packaging, and Deploying the SAAJ Service

Building, Packaging, and Deploying the Coffee Break Server

Building, Packaging, and Deploying the JavaServer Faces Technology Version of the Coffee Break Server

Running the Coffee Break Client

Removing the Coffee Break Application

Chapter 36:   The Duke's Bank Application

Enterprise Beans

Session Beans

Entity Beans

Helper Classes

Database Tables

Protecting the Enterprise Beans

Application Client

The Classes and Their Relationships

BankAdmin Class

EventHandle Class

DataModel Class

Web Client

Design Strategies

Client Components

Request Processing

Protecting the Web Client Resources

Internationalization

Building, Packaging, Deploying, and Running the Application

Setting Up the Servers

Compiling the Duke's Bank Application Code

Packaging and Deploying the Duke's Bank Application

Reviewing JNDI Names

Running the Clients

Running the Application Client

Running the Web Client

Appendix A:   Java Encoding Schemes

Further Information

Appendix B:   XML and Related Specs: Digesting the Alphabet Soup

Basic Standards

SAX

StAX

DOM

JDOM and dom4j

DTD

Namespaces

XSL

XSLT (+XPath)

Schema Standards

XML Schema

RELAX NG

SOX

Schematron

Linking and Presentation Standards

XML Linking

XHTML

Knowledge Standards

RDF

RDF Schema

XTM

Standards That Build on XML

Extended Document Standards

e-Commerce Standards

Summary

Appendix C:   HTTP Overview

HTTP Requests

HTTP Responses

Appendix D:   J2EE Connector Architecture

About Resource Adapters

Resource Adapter Contracts

Management Contracts

Outbound Contracts

Inbound Contracts

Common Client Interface

Further Information

Glossary

About the Authors

Index