did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780201791686

The J2EE(TM) Tutorial

by ; ; ; ; ;
  • ISBN13:

    9780201791686

  • ISBN10:

    0201791684

  • Format: Paperback w/CD
  • Copyright: 2002-01-01
  • Publisher: Addison-Wesley Professional
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99

Summary

Following in the footsteps of the The Java Tutorial -- a global best-seller -- The J2EE Tutorial offers an indispensable, example-centered resource for every developer who wants to master enterprise development with Java 2 Enterprise Edition, Version 1.3. The authors -- all of them Sun senior writers with direct access to the architects of the J2EE platform -- offer concise, hands-on introductions to each key J2EE technology. They offer practical techniques and examples for working with Enterprise JavaBeans, servlets, JavaServer Pages, Java Message Service (JMS), Java Naming and Directory Interface (JNDI), XML, the J2EE Connector Architecture, JavaMail, and JDBC. The book has been refined to reflect thousands of comments from developers utilizing draft editions published on the Web. All contents and examples are also provided on the accompanying CD-ROM, along with complete copies of the J2EE and J2SE Version 1.3 platform. For every experienced Java programmer who wants to build enterprise solutions with Java 2 Enterprise Edition Version 1.3.

Table of Contents

Foreword xvii
Preface xxi
Overview
1(20)
Distributed Multitiered Applications
2(6)
J2EE Components
3(1)
J2EE Clients
4(2)
Web Components
6(1)
Business Components
6(2)
Enterprise Information System Tier
8(1)
J2EE Containers
8(2)
Container Services
8(1)
Container Types
9(1)
Packaging
10(1)
Development Roles
11(3)
J2EE Product Provider
12(1)
Tool Provider
12(1)
Application Component Provider
12(1)
Application Assembler
13(1)
Application Deployer and Administrator
14(1)
Reference Implementation Software
14(7)
Database Access
15(1)
J2EE APIs
15(3)
Simplified Systems Integration
18(1)
Tools
19(2)
Getting Started
21(26)
Setting Up
22(2)
Geetting the Example Code
22(1)
Getting the Build Tool (ant)
22(1)
Checking the Environment Variables
23(1)
Starting the J2EE Server
23(1)
Starting the deploytool
23(1)
Creating the J2EE Application
24(1)
Creating the Enterprise Bean
24(4)
Coding the Enterprise Bean
24(2)
Compiling the Source Files
26(1)
Packaging the Enterprise Bean
26(2)
Creating the J2EE Application Client
28(4)
Coding the J2EE Application Client
28(3)
Compiling the Application Client
31(1)
Packaging the J2EE Application Client
31(1)
Specifying the Application Client's Enterprises Bean Reference
32(1)
Creating the Web Client
32(3)
Coding the Web Client
32(2)
Compiling the Web Client
34(1)
Packaging the Web Client
34(1)
Specifying the Web Client's Enterprise Bean Reference
35(1)
Specifying the JNDI Names
35(2)
Deploying the J2EE Application
37(1)
Running the J2EE Application Client
37(1)
Running the Web Client
38(1)
Modifying the J2EE Application
39(1)
Modifying a Class File
39(1)
Adding a File
39(1)
Modifying the Web Client
39(1)
Modifying a Deployment Setting
40(1)
Common Problems and Their Solutions
40(7)
Cannot Start the J2EE Server
40(1)
Compilation Errors
41(1)
Deployment Errors
42(1)
J2EE Application Client Runtime Errors
43(1)
Web Client Runtime Errors
44(1)
Detecting Problems With the Verifier Tool
45(1)
Comparing Your EAR Files With Ours
45(1)
When All Else Fails
45(2)
Enterprise Beans
47(22)
What Is an Enterprise Bean?
48(1)
Benefits of Enterprise Beans
48(1)
When to Use Enterprise Beans
49(1)
Types of Enterprise Beans
49(1)
What Is a Session Bean?
49(2)
State Management Modes
50(1)
When to Use Session Beans
51(1)
What Is an Entity Bean?
51(5)
What Makes Entity Beans Different from Session Beans?
52(1)
Container-Managed Persistence
53(3)
When to Use Entity Beans
56(1)
What Is a Message-Driven Bean?
56(2)
What Makes Message-Driven Beans Different from Session and Entity Beans?
57(1)
When to Use Message-Driven Beans
57(1)
Defining Client Access with Interfaces
58(4)
Remote Access
58(1)
Local Access
59(1)
Local Interfaces and Container-Managed Relationships
59(1)
Deciding on Remote or Local Access
60(1)
Performance and Access
61(1)
Method Parameters and Access
61(1)
The Contents of an Enterprise Bean
62(1)
Naming Conventions For Enterprise Beans
62(1)
The Life Cycles of Enterprise Beans
63(6)
The Life Cycle of a Stateful Session Bean
63(1)
The Life Cycle of a Stateless Session Bean
64(1)
The Life Cycle of an Entity Bean
65(2)
The Life Cycle of a Message-Driven Bean
67(2)
A Session Bean Example
69(14)
The CartEJB Example
70(8)
Session Bean Class
70(4)
Home Interface
74(2)
Remote Interface
76(1)
Helper Classes
76(1)
Running the CartEJB Example
76(2)
Other Enterprise Bean Features
78(5)
Accessing Environment Entries
78(2)
Comparing Enterprise Beans
80(1)
Passing an Enterprise Bean's Object Reference
80(3)
Bean-Managed Persistence Examples
83(36)
The Savings Account EJB Example
84(15)
Entity Bean Class
84(10)
Home Interface
94(2)
Remote Interface
96(1)
Running the SavingsAccount EJB Example
97(2)
deploytool Tips for Entity Beans With Bean-Managed Persistence
99(1)
Mapping Table Relationships for Bean-Managed Persistence
99(14)
One-to-One Relationships
99(4)
One-to-Many Relationships
103(7)
Many-to-Many Relationships
110(3)
Primary Keys for Bean-Managed Persistence
113(3)
The Primary Key Class
113(2)
Primary Keys in the Entity Beans Class
115(1)
Getting the Primary Key
116(1)
Handling Exceptions
116(3)
Container-Managed Persistence Examples
119(36)
Overview of the Roster App Application
120(1)
The Player EJB Code
121(7)
Entity Bean Class
122(4)
Local Home Interface
126(1)
Local Interface
127(1)
A Guided Tour of the Roster App Settings
128(8)
RosterApp
128(1)
Roster Client
129(1)
RosterJAR
130(1)
TeamJAR
131(5)
Method Invocations in RosterApp
136(11)
Creating a Player
137(1)
Adding a Player to a Team
138(1)
Removing a Player
139(1)
Dropping a Player from a Team
140(1)
Getting the Players of a Team
141(1)
Getting a Copy of a Team's Players
142(2)
Finding the Players by Position
144(1)
Getting the Sports of a Player
145(2)
Running the RosterApp Example
147(1)
Setting Up
147(1)
Deploying the Application
147(1)
Running the Client
148(1)
deploytool Tips for Entity Beans with Container-Managed Persistence
148(3)
Specifying the Bean's Type
148(1)
Spelecting the Persistent Fields and Abstract Schema Name
149(1)
Defining EJB QL Queriers for Finder and Select Methods
149(1)
Generating SQL and Specifying Table Creation
149(1)
Specifying the Database JNDI Name, User Name, and Password
150(1)
Defining Relationships
150(1)
Primary Keys for Container-Managed Persistence
151(4)
The Primary Key Class
151(1)
Primary Keys in the Entity Bean Class
152(1)
Generating Primary Key Values
153(2)
A Message-Driven Bean Example
155(10)
Example Application Overview
156(1)
The J2EE Application Client
157(1)
The Message-Driven Bean Class
157(2)
The onMessage Method
158(1)
The ejbCreate and ejbRemove Methods
159(1)
Running the Simple Message EJB Example
159(1)
Starting the J2EE Server
159(1)
Creating the Queue
159(1)
Deploying the Application
159(1)
Running the Client
160(1)
deploytool Tips for Message-Driven Beans
160(2)
Specifying the Bean's Type and Transaction Management
161(1)
Setting the Message-Driven Bean's Characteristics
161(1)
deploytool Tips for JMS Clients
162(3)
Setting the Resource References
162(1)
Setting the Resources Environment References
163(1)
Specifying the JNDI Names
163(2)
Enterprise JavaBeans Query Language
165(28)
Terminology
166(1)
Simplified Syntax
167(1)
Example Queries
167(6)
Simple Finder Queries
167(2)
Finder Queries That Navigate to Related Beans
169(1)
Finder Queries with Other Conditional Expressions
170(2)
Select Queries
172(1)
Full Syntax
173(18)
BNF Symbols
173(1)
BNF Grammar of EJB QL
173(3)
FROM Clause
176(3)
Path Expressions
179(3)
WHERE Clause
182(8)
SELECT Clause
190(1)
EJB QL Restrictions
191(2)
Web Clients and Components
193(16)
Web Client Life Cycle
194(2)
Web Application Archives
196(3)
Creating a WAR File
197(1)
Adding a WAR File to an EAR File
197(1)
Adding a Web Component to a WAR File
198(1)
Configuring Web Clients
199(4)
Application-Level Configuration
199(1)
WAR-Level Configuration
200(2)
Component-Level Configuration
202(1)
Deploying Web Clients
203(1)
Running Web Clients
203(1)
Updating Web Clients
204(2)
Internationalizing Web Clients
206(3)
Java Servlet Technology
209(36)
What Is a Servlet?
210(1)
The Example Servlets
211(5)
Troubleshooting
215(1)
Servlet Life Cycle
216(2)
Handling Servlet Life-Cycle Events
216(2)
Handling Errors
218(1)
Sharing Information
218(4)
Using Scope Objects
219(1)
Controlling Concurrent Access to Shared Resources
220(1)
Accessing Databases
221(1)
Initializing a Servlet
222(1)
Writing Service Methods
222(5)
Getting Information from Requests
223(2)
Constructing Responses
225(2)
Filtering Requests and Responses
227(7)
Programming Filters
229(1)
Programming Customized Requests and Responses
230(2)
Specifying Filter Mappings
232(2)
Invoking Other Web Resources
234(3)
Including Other Resources in the Response
234(2)
Transferring Control to Another Web Component
236(1)
Accessing The Web Context
237(1)
Maintaining Client State
238(3)
Accessing a Session
238(1)
Associating Attributes with a Session
238(1)
Session Management
239(1)
Session Tracking
240(1)
Finalizing a Servlet
241(4)
Tracking Service Requests
242(1)
Notifying Methods to Shut Down
242(1)
Creating Polite Long-Running Methods
243(2)
Java Server Pages Technology
245(24)
What Is a JSP Page?
246(3)
The Example JSP Pages
249(4)
The Life Cycle of a JSP Page
253(3)
Translation and Compilation
253(1)
Execution
254(2)
Initializing and Finalizing a JSP Page
256(1)
Creating Static Content
257(1)
Creating Dynamic Content
257(6)
Using Objects within JSP Pages
257(3)
JSP Scripting Elements
260(3)
Including Content in a JSP Page
263(2)
Transferring Control To Another Web Component
265(1)
Param Element
265(1)
Including an Applet
265(2)
Extending the JSP Language
267(2)
Java Beans Components in JSP Pages
269(10)
JavaBeans Component Design Conventions
270(1)
Why Use a Java Beans Component?
271(1)
Creating and Using a JavaBeans Component
272(1)
Setting JavaBeans Component Properties
273(2)
Retrieving Java Beans Component Properties
275(4)
Custom Tags in JSP Pages
279(36)
What Is a Custom Tag?
280(1)
The Example JSP Pages
281(4)
Using Tags
285(4)
Declaring Tag Libraries
285(1)
Types of Tags
286(3)
Defining Tags
289(15)
Tag Handlers
289(1)
Tag Library Descriptors
290(3)
Simple Tags
293(1)
Tags With Attributes
294(2)
Tags With Bodies
296(2)
Tags That Define Scripting Variables
298(4)
Cooperating Tags
302(2)
Examples
304(9)
An Iteration Tag
304(4)
A Template Tag Library
308(5)
How Is a Tag Handler Invoked?
313(2)
Transactions
315(18)
What Is a Transaction?
316(1)
Container-Managed Transactions
316(7)
Transaction Attributes
317(4)
Rolling Back a Container-Managed Transaction
321(1)
Synchronizing a Session Bean's Instance Variables
322(1)
Methods Not Allowed in Container-Managed Transactions
323(1)
Bean-Managed Transactions
323(4)
JDBC Transactions
324(1)
JTA Transactions
325(1)
Returning without Committing
326(1)
Methods Not Allowed in Bean-Managed Transactions
327(1)
Summary of Transaction Options for Enterprise Beans
327(1)
Transaction Timeouts
328(1)
Isolations Levels
328(1)
Updating Multiple Databases
329(2)
Transactions in Web Components
331(2)
Security
333(20)
Overview
334(1)
Security Roles
335(2)
Declaring and Linking Role References
335(2)
Mapping Roles to J2EE Users and Groups
337(1)
Web-Tier Security
337(3)
Protecting Web Resources
337(1)
Controlling Access To Web Resources
338(1)
Authenticating Users of Web Resources
338(2)
Using Programmatic Security in the Web Tier
340(1)
Unprotected Web Resources
340(1)
EJB-Tier Security
340(2)
Declaring Method Permissions
341(1)
Using Programmatic Security in the EJB Tier
341(1)
Unprotected EJB-Tier Resources
342(1)
Application Client-Tier Security
342(1)
Specifying the Application Client's Callback Handler
343(1)
EIS-Tier Security
343(3)
Configuring Sign-On
344(1)
Container-Managed Sign-On
344(1)
Component-Managed Sign-On
344(1)
Configuring Resource Adapter Security
345(1)
Propagating Security Identity
346(2)
Configuring a Component's Propagated Security Identity
346(1)
Configuring Client Authentication
347(1)
J2EE Users, Realms, and Groups
348(2)
Managing J2EE Users and Groups
349(1)
Setting Up a Server Certificate
350(3)
Resource Connections
353(12)
JNDI Names and Resource References
354(3)
Deploytool Tips for Resource References
354(3)
Database Connections for Enterprise Beans
357(2)
Coded Connections
357(2)
Connection Pooling
359(1)
Mail Session Connections
359(3)
Running the Confirmer EJB Example
361(1)
URL Connections
362(3)
Running the HTML Reader EJB Example
363(2)
J2EE Connector Architecture
365(26)
About Resource Adapters
366(3)
Resource Adapter Contracts
366(2)
Administering Resource Adapters
368(1)
The Black Box Resource Adapters
369(3)
Transaction Levels
369(1)
Properties
370(1)
Configuring JDBC Drivers
371(1)
Resource Adapter Tutorial
372(3)
Setting Up
372(1)
Deploying the Resource Adapter
372(1)
Testing the Resource Adapter
373(2)
Common Client Interface
375(16)
Overview of the CCI
375(1)
Programming With the CCI
376(9)
Writing a CCI Client
385(1)
CCI Tutorial
386(5)
The Duke's Bank Application
391(36)
Enterprises Beans
393(7)
Session Beans
394(3)
Entity Beans
397(1)
Helper Classes
397(1)
Database Tables
398(2)
Protecting the Enterprise Beans
400(1)
Application Client
400(8)
The Classes and Their Relationships
401(2)
Bank Admin Class
403(1)
Event Handle Class
404(1)
Data Model Class
405(3)
Web Client
408(6)
Design Strategies
409(1)
Web Client Life Cycle
410(4)
Protecting the Web Resources
414(1)
Internationalization
414(2)
Building, Packaging, Deploying, and Running the Application
416(11)
Adding Groups and Users to the Realm
416(1)
Starting the J2EE Server, deploytool, and Database
417(1)
Compiling the Enterprise Beans
418(1)
Packaging the Enterprises Beans
418(1)
Compling the Web Client
419(1)
Packaging the Web Client
419(1)
Compiling the J2EE Application Client
419(1)
Packaging the J2EE Application Client
419(1)
Packaging the Enterprise Archive File
420(1)
Opening the Enterprise Archive File
420(1)
Reviewing JNDI Names
420(3)
Mapping the Security Roles to Groups
423(1)
Deploying the Duke's Bank Application
423(1)
Creating the Bank Database
424(1)
Running the J2EE Application Client
424(1)
Running the Web Client
425(2)
Appendix A: HTTP Overview 427(2)
HTTP Requests
428(1)
HTTP Responses
428(1)
Appendix B: J2EE SDK Tools 429(16)
J2EE Administration Tool
430(1)
Cleanup Tool
431(1)
Cloudscape Server
431(3)
Starting cloudscape
432(1)
Stopping Cloudscape
432(1)
Running the Interactive SQL Tool
432(1)
Cloudscape Server Configuration
433(1)
Deployment Tool
434(1)
J2EE Server
435(1)
Key Tool
435(1)
Packager Tool
436(4)
EJB JAR File
436(1)
Web Application WAR File
437(1)
Application Client JAR File
437(1)
J2EE Application EAR File
438(1)
Specifying the Runtime Deployment Descriptor
438(1)
Resource Adapter RAR File
439(1)
Realm Tool
440(1)
Examples
440(1)
runclient Script
441(2)
Syntax
441(1)
Example
442(1)
Accessing a Remote Server
442(1)
Preventing the User Name and Password Prompts
443(1)
Verifier Tool
443(2)
Command-Line Verifier
443(1)
Stand-Alone GUI Verifier
444(1)
Appendix C: Examples 445(4)
Glossary 449(24)
About the Authors 473(2)
Index 475

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program