(Java) - Teach Yourself J2EE in 21 Days - Sams (eBook-pdf).pdf
(
12229 KB
)
Pobierz
357601660 UNPDF
Martin Bond
Dan Haywood
Debbie Law
Andy Longshaw
Peter Roxburgh
J2EE
in
21
Days
201 West 103rd St., Indianapolis, Indiana, 46290 USA
TeachYourself
2002 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical, photo-
copying, recording, or otherwise, without written permission from the publish-
er. No patent liability is assumed with respect to the use of the information
contained herein. Although every precaution has been taken in the preparation
of this book, the publisher and author assume no responsibility for errors or
omissions. Nor is any liability assumed for damages resulting from the use of
the information contained herein.
A
CQUISITIONS
E
DITOR
Todd Green
D
EVELOPMENT
E
DITOR
Michael Watson
P
ROJECT
E
DITOR
Christina Smith
C
OPY
E
DITOR
Pat Kinyon
I
NDEXERS
Tom Dinse
Erika Millen
P
ROOFREADER
Melissa Lynch
T
ECHNICAL
E
DITOR
Harold Finz, Steve Heckler,
Farooq Karim, and Ari
Krupnikov
T
EAM
C
OORDINATOR
Pamalee Nelson
I
NTERIOR
D
ESIGNER
Gary Adair
C
OVER
D
ESIGNER
Aren Howell
P
RODUCTION
Cheryl Lynch
Michelle Mitchell
International Standard Book Number: 0-672-32384-2
Library of Congress Catalog Card Number: 2001098579
Printed in the United States of America
First Printing: April, 2002
3210
4321
Trademarks
All terms mentioned in this book that are known to be trademarks or service
marks have been appropriately capitalized. Sams Publishing cannot attest to
the accuracy of this information. Use of a term in this book should not be
regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as
possible, but no warranty or fitness is implied. The information provided is on
an “as is” basis. The authors and the publisher shall have neither liability nor
responsibility to any person or entity with respect to any loss or damages aris-
ing from the information contained in this book.
E
XECUTIVE
E
DITOR
Michael Stephens
M
ANAGING
E
DITOR
Matt Purcell
Sams Teach Yourself J2EE in 21 Days
Copyright
Contents at a Glance
Introduction
1
W
EEK
1 Introducing J2EE and EJBs
7
Day 1 The Challenge of N-Tier Development
9
2 The J2EE Platform and Roles
27
3 Naming and Directory Services
81
4 Introduction to EJBs
125
5 Session EJBs
165
6 Entity EJBs
211
7 CMP and EJB QL
271
W
EEK
2 Developing J2EE Applications
333
Day 8 Transactions and Persistence
335
9 Java Message Service
395
10 Message-Driven Beans
429
11 JavaMail
461
12 Servlets
501
13 JavaServer Pages
555
14 JSP Tag Libraries
603
W
EEK
3 Integrating J2EE into the Enterprise
651
Day 15 Security
653
16 Integrating XML with J2EE
701
17 Transforming XML Documents
741
18 Patterns
787
19 Integrating with External Resources
827
20 Using RPC-Style Web Services with J2EE
869
21 Web Service Registries and Message-Style Web Services
923
Appendixes
Appendix A An Introduction to UML
965
B SQL Reference
977
C An Overview of XML
987
D The Java Community Process
999
Glossary
1003
Index
1025
Contents
Introduction 1
W
EEK
1 Introducing J2EE and EJBs
7
D
AY
1 The Challenge of N-Tier Development 9
Monolithic Development ......................................................................................10
Consequences of Monolithic Applications ......................................................10
The Move into the Second Tier ............................................................................11
Consequences of the 2-Tier Design ................................................................12
Complexity Simplified by Modularity ................................................................14
Component Technology ..................................................................................15
Benefits of Modularity ....................................................................................16
Benefits of the 3-Tier Scenario ............................................................................16
A Model for Enterprise Computing ....................................................................17
Lifecycle ..........................................................................................................18
Persistence ......................................................................................................18
Naming ............................................................................................................18
Transaction ......................................................................................................19
Java 2 Enterprise Edition (J2EE) ..........................................................................20
Components and Containers ............................................................................20
J2EE Standard Services ..................................................................................21
J2EE Blueprints ..............................................................................................23
J2EE Compatibility Test Suite ........................................................................24
The Future of J2EE ..............................................................................................25
Summary ..............................................................................................................25
Q&A ......................................................................................................................25
Exercises ..............................................................................................................26
D
AY
2 The J2EE Platform and Roles 27
Revisiting the J2EE Platform ..............................................................................28
Using Sun Microsystems’ J2EE SDK ..................................................................28
Installing J2EE SDK 1.3 ................................................................................29
Starting the J2EE Reference Implementation (RI) ........................................32
Troubleshooting J2EE and Cloudscape ..........................................................34
Closing Down J2EE RI and Cloudscape ........................................................37
Optional Software Used in this Book ............................................................37
Understanding Tiers and Components ..................................................................38
The Business Tier ..........................................................................................39
The Presentation Tier ......................................................................................44
Components: Web-Centric ..............................................................................45
The Client Tier ................................................................................................49
Standalone Client ............................................................................................52
Understanding Containers ....................................................................................55
Understanding the Services Containers Supply to Components ..........................56
Hypertext Transfer Protocol (HTTP) ..............................................................57
HTTP over Secure Sockets Layer (HTTPS) ..................................................57
Java Database Connectivity (JDBC) ..............................................................57
Java Transaction API (JTA) ............................................................................58
Java Authentication and Authorization Service (JAAS) ................................58
Java API for XML Parsing (JAXP) ................................................................58
Java Naming and Directory Interface (JNDI) ................................................59
JavaBeans Activation Framework (JAF) ........................................................59
JavaMail ..........................................................................................................60
Java Message Service (JMS) ..........................................................................60
Java Interface Definition Language (Java IDL) ..............................................60
Remote Method Invocation over Internet Inter-Orb Protocol (RMI-IIOP) ....61
Connector Architecture ....................................................................................62
Introducing Platform Roles ..................................................................................62
J2EE Product Provider ....................................................................................63
Application Component Provider ....................................................................63
Application Assembler ....................................................................................63
Application Deployer ......................................................................................64
Systems Administrator ....................................................................................64
Tool Provider ..................................................................................................65
Future of J2EE tools ........................................................................................65
Packaging and Deploying J2EE Applications ......................................................66
J2EE applications ..........................................................................................67
Breaking Modules down into Components ....................................................68
Summary ..............................................................................................................70
Q&A ......................................................................................................................70
Exercises—Case Study ........................................................................................71
The Job Agency ..............................................................................................72
Using the Agency Case Study ........................................................................73
Practice Makes Perfect ....................................................................................75
The Case Study Directory on the CD-ROM ..................................................76
Installing the Case Study Database ................................................................76
D
AY
3 Naming and Directory Services 81
Naming and Directory Services ............................................................................82
Why Use a Naming Service? ................................................................................82
What is JNDI? ......................................................................................................83
Plik z chomika:
JLV
Inne pliki z tego folderu:
xDoclet_jboss_first_EJB.pdf
(326 KB)
Wrox Press. - J2EE Design Patterns Applied.pdf
(1437 KB)
Wrox Press Expert One-On-One J2ee Development Without Ejb.pdf
(8141 KB)
Wiley - Mastering EJB 3 - 2006.pdf
(10140 KB)
Wiley - J2EE Best Practices - Java Design Patterns, Automation and Performance - 2003 - (By Laxxuss).pdf
(4382 KB)
Inne foldery tego chomika:
Book
certyfication
Enterprise Java
JAVA_WPoleca
JBoss
Zgłoś jeśli
naruszono regulamin