Building Java Enterprise Applications vol I Architecture 2002.pdf
(
3414 KB
)
Pobierz
Building Java Enterprise Applications Volume I: Architecture
Building Java™ Enterprise Applications Volume I: Architecture
Brett McLaughlin
Publisher: O'Reilly
First Edition March 2002
ISBN: 0-569-00123-1, 318 pages
Volume 1 of this advanced 3-volume guide explores the infrastructure issues so important to
good application design. It isn't just a book about Entity Beans and JNDI. It takes you step by
step through building the back end, designing the data store so that it gives you convenient
access to the data your application needs; designing a directory; figuring out how to handle
security and where to store security credentials you need; and so on.
Table of Contents
Preface
.....................................................
Organization
.................................................
Software and Versions
..........................................
Conventions Used in This Book
....................................
Comments and Questions
........................................
Acknowledgments
.............................................
1
1
3
3
4
5
1. Introduction
................................................
1.1 Building Java Enterprise Applications
.............................
1.2 Architecture
...............................................
1.3 What You'll Need
...........................................
6
6
8
10
2. Blueprints
.................................................
2.1 Forethought Brokerage
.......................................
2.2 The Data Layer
............................................
2.3 The Business Layer
..........................................
2.4 The Presentation Layer
.......................................
2.5 Finalizing the Plans
..........................................
2.6 What's Next?
..............................................
13
13
19
23
26
27
27
3. Foundation
.................................................
3.1 Designing the Data Stores
.....................................
3.2 Databases
................................................
3.3 Directory Servers
...........................................
3.4 What's Next?
..............................................
28
28
37
47
55
4. Entity Basics
................................................
4.1 Basic Design Patterns
........................................
4.2 Coding the Bean
............................................
4.3 Deploying the Bean
..........................................
4.4 What's Next?
..............................................
56
56
57
66
69
5. Advanced Entities
............................................
5.1 IDs, Sequences, and CMP
.....................................
5.2 Details, Details, Details
.......................................
5.3 Data Modeling
.............................................
5.4 Filling in the Blanks
.........................................
5.5 What's Next?
..............................................
70
70
85
89
91
91
6. Managers
..................................................
6.1 Managers and Entities
........................................
6.2 The LDAPManager Class
......................................
6.3 What's Next?
..............................................
92
92
98
119
7. Completing the Data Layer
.....................................
7.1 Odds and Ends
.............................................
7.2 Checkpoint
...............................................
7.3 Populating the Data Stores
.....................................
7.4 What's Next?
..............................................
120
120
128
130
135
8. Business Logic
..............................................
8.1 The Façade Pattern
..........................................
8.2 The UserManager
...........................................
8.3 State Design
..............................................
8.4 What's Next?
..............................................
137
137
144
152
163
9. Messaging and Packaging
......................................
9.1 Messaging on the Server
......................................
9.2 Messaging on the Client
.......................................
9.3 Packaging
................................................
9.4 What's Next?
..............................................
164
164
172
175
178
10. Beyond Architecture
.........................................
10.1 Flexibility
...............................................
10.2 Decision Point
............................................
10.3 What's Next?
.............................................
179
179
182
183
A. SQL Scripts
................................................
A.1 The User Store
............................................
A.2 The Accounts Store
.........................................
A.3 Events and Scheduling
.......................................
A.4 Starting Over
.............................................
A.5 Primary Keys
.............................................
A.6 Creating Types
............................................
185
186
191
196
198
201
204
B. SQL Deployment
............................................
B.1 Cloudscape
...............................................
B.2 InstantDB
................................................
B.3 MySQL
.................................................
B.4 Oracle
..................................................
B.5 PostgreSQL
..............................................
206
206
208
210
211
213
C. Directory Server Setup
........................................
C.1 iPlanet
..................................................
C.2 OpenLDAP
...............................................
215
215
221
D. Application Server Setup
.......................................
D.1 BEA Weblogic
............................................
225
225
E. Supplemental Code Listings
.....................................
E.1 Entity Beans
..............................................
E.2 Application Exceptions
.......................................
228
228
267
Colophon
....................................................
270
Building Java™ Enterprise Applications Volume I: Architecture
Preface
If you're basing your livelihood on Java these days, you are going to run across at least one
enterprise application programming project; if it hasn't come upon you already, it's just around
the corner. I've been faced with more than twenty at this point in my career, and see many
more in my future. Each time I get into these projects, I find myself paging through book after
book and searching the Web, looking for the same information time after time. Additionally,
I've developed a bit of a toolkit for handling common enterprise tasks.
What I have determined is that there are many terrific books on specific technologies like
Enterprise JavaBeans, servlets, and the Java Message Service. These books cover the details
of these APIs and explain how to use them. I have also found, though, that there is no
resource in existence that describes connecting these components in an intelligent way. No
coherent examples are documented and explained that tell how best to code façade patterns,
attach entity beans to directory servers, use servlets and JSP with EJB without killing
performance, or a host of other common tasks. At the same time, these very issues are the
heart of my job description, and probably of many other programmers' as well.
Rather than simply write a short article or two and fall short of really addressing the topic
(something I see lots of people doing), I convinced O'Reilly & Associates to put forth an
exhaustive series on enterprise programming in Java. I'm proud to say that you have in your
hands the first volume of that series. It covers the back-end of application programming and
explains databases, entity beans, session beans, the Java Message Service, JNDI, RMI, LDAP,
and a whole lot more.
The topic will be extended in the next two volumes, which are already planned. The second
volume will cover traditional web applications, including HTTP, HTML, servlets, JSP, and
XML presentation solutions. The third volume will detail the web services paradigm,
demonstrating the use of UDDI, SOAP, WSDL, and other emerging technologies.
In each volume, you will find extensive code (the code listings in this book, without
comments, total well over 100 pages, about 30% of the actual book), without needless
instruction or banter. I've gotten straight to the point, and tried to let you see code, not
discussion of code, whenever possible. I hope that you enjoy the series, and that it aids you in
your own enterprise application programming.
Organization
This book starts from the back of an enterprise application, moves from introduction into
design and planning, through the database and directory server, and into the code you'll need
to use this data. Here are concise descriptions of each chapter.
Chapter 1
This chapter expands on the basic information in this Preface. It provides a blueprint
for the series as well as the topics included in the chapters of this book.
1
Plik z chomika:
X-files
Inne pliki z tego folderu:
Wireless Java Developing with J2ME 2nd 2003.chm
(2615 KB)
Wireless J2ME Platform Programming , 2002.pdf
(2614 KB)
using uml for modeling a distributed java application 1997.pdf
(707 KB)
Using Java 2 Standard Ed 2001.chm
(6449 KB)
Using Enterprise JavaBeans 2.0 2002.chm
(1098 KB)
Inne foldery tego chomika:
130 linux and unix ebooks
132 C and C++ ebooks
156 database ebooks
237.For.Dummies.ebooks.Wiley.Publishing
Architecture e-books
Zgłoś jeśli
naruszono regulamin