Sams - Building Java Enterprise Systems with J2EE.pdf

(13715 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
839298987.001.png
Building Java Enterprise Systems with J2EE
CONTENTS
A BOUT T HE A UTHORS ...............................................................................................2
A CKNOWLEDGMENTS .................................................................................................2
T ELL U S W HAT Y OU T HINK ! ......................................................................................3
I NTRODUCTION ...........................................................................................................4
This Is Your Enterprise on Caffeine! ................................................................4
This Is the Book to Address Your Needs! .......................................................5
This Is Your Brain After Reading This Book! ..................................................8
P ART I: E NTERPRISE F OUNDATIONS .......................................................................10
IN THIS PART ..................................................................................................10
C HAPTER 1. E NTERPRISE A RCHITECTURAL O VERVIEW .........................................10
The Enterprise ...................................................................................................11
Enterprise Components ...................................................................................13
Information Technology in the Enterprise .....................................................14
Conclusions ........................................................................................................16
C HAPTER 2. O BJECT -O RIENTED S OFTWARE D EVELOPMENT FOR THE E NTERPRISE
..................................................................................................................................16
Enterprise Objects .............................................................................................17
The Object-Oriented Development Process .................................................20
Unified Modeling Language .............................................................................25
Conclusions ........................................................................................................32
C HAPTER 3. C OMPONENT -B ASED S OFTWARE D EVELOPMENT FOR THE
E NTERPRISE .............................................................................................................32
Enterprise Components ...................................................................................32
Component Models ...........................................................................................34
Component-Based Development ...................................................................38
Standards ...........................................................................................................40
Conclusions ........................................................................................................43
C HAPTER 4. J AVA F OUNDATIONS FOR E NTERPRISE D EVELOPMENT .....................44
Java Features and Versions ............................................................................44
Java Platform Architecture ...............................................................................47
Java Files and Tools .........................................................................................49
Java Language ..................................................................................................52
Core Java Language APIs ...............................................................................57
Collection APIs ..................................................................................................64
Input/Output and State Persistence APIs ......................................................68
Threading APIs ..................................................................................................73
Date and Time APIs ..........................................................................................77
Java Applets .......................................................................................................78
Conclusions ........................................................................................................82
C HAPTER 5. J AVA E NTERPRISE S YSTEM A RCHITECTURE WITH THE J2EE ...........82
The J2EE Model ................................................................................................83
J2SE V 1.2 VERSUS J2SE V 1.3 ..........................................................................85
Enterprise Java and J2EE Architecture .........................................................87
Data Connectivity ..............................................................................................90
Communication Mechanisms ..........................................................................91
Assurance Mechanisms ...................................................................................93
Client Connectivity ............................................................................................94
Web Connectivity ..............................................................................................95
Building Java Enterprise Systems with J2EE
Application Connectivity ...................................................................................96
The J2EE Future ...............................................................................................96
Conclusions ........................................................................................................98
C HAPTER 6. E NTERPRISE U SER I NTERFACING .......................................................99
The Distributed Enterprise User Interface .....................................................99
Java AWT Components .................................................................................102
Java Swing Components ...............................................................................103
Utility and Accessibility Components ...........................................................105
Graphics and Multimedia Components .......................................................106
Web Page Interfaces ......................................................................................107
Conclusions ......................................................................................................109
C HAPTER 7. M ODELING C OMPONENTS WITH J AVA B EANS ...................................110
JavaBeans Overview ......................................................................................111
JavaBeans Containers ...................................................................................112
JavaBeans Events ..........................................................................................116
JavaBeans Properties ....................................................................................118
JavaBeans Introspection ................................................................................124
JavaBeans Persistence ..................................................................................126
JavaBeans Customization .............................................................................127
The InfoBus ......................................................................................................130
Conclusions ......................................................................................................131
P ART II: E NTERPRISE D ATA E NABLING .................................................................132
IN THIS PART ................................................................................................132
C HAPTER 8. E NTERPRISE D ATA ............................................................................133
Database Basics ..............................................................................................133
Relational Databases .....................................................................................136
Object Databases ............................................................................................142
RDBMSs Versus ODBMSs ............................................................................144
Relational/Object Translations ......................................................................146
CLIs ...................................................................................................................148
Embedded SQL ...............................................................................................148
ODBC ................................................................................................................150
JDBC .................................................................................................................150
Conclusions ......................................................................................................151
C HAPTER 9. B ASIC JDBC .....................................................................................151
JDBC Architecture ...........................................................................................152
JDBC Drivers and their Types .......................................................................155
T HE J2EE AND JDBC D RIVER T YPE S ELECTION ............................................155
JDBC Driver Configuration ............................................................................159
T HE J2EE AND JDBC D RIVER C ONFIGURATION .............................................159
JDBC Connections ..........................................................................................162
T HE J2EE AND JDBC C ONNECTIONS ..............................................................162
JDBC Statements ............................................................................................167
JDBC Result Sets ............................................................................................176
SQL and Java Mappings ................................................................................183
JDBC MetaData ...............................................................................................184
Conclusions ......................................................................................................189
C HAPTER 10. A DVANCED JDBC ...........................................................................189
Scrollable Result Sets ....................................................................................190
Updateable Result Sets .................................................................................199
Building Java Enterprise Systems with J2EE
Batch Updates .................................................................................................208
Advanced Data Types ....................................................................................211
Row Sets ..........................................................................................................224
Stored Procedures ..........................................................................................226
Database Naming via JNDI ...........................................................................231
T HE J2EE AND JDBC 2.0 ................................................................................231
Connection Pools ............................................................................................233
Distributed Transactions ................................................................................235
Conclusions ......................................................................................................236
P ART III: E NTERPRISE D ATA E NABLING ................................................................238
IN THIS PART ................................................................................................238
C HAPTER 11. D ISTRIBUTED E NTERPRISE C OMMUNICATIONS ..............................239
Distributed Systems ........................................................................................239
Distribution Mechanisms ................................................................................241
The Network Client ..........................................................................................243
The Network Server ........................................................................................244
Conclusions ......................................................................................................246
C HAPTER 12. N ETWORK C OMMUNICATIONS ........................................................246
Network Computing ........................................................................................247
TCP/IP Protocol Suite .....................................................................................249
J AVA S OCKET P ROGRAMMING AND THE J2EE .................................................255
C HAPTER 13. W EB C OMMUNICATIONS .................................................................275
The Internet and the World Wide Web ........................................................275
HTTP .................................................................................................................278
CGI ....................................................................................................................287
Servlets .............................................................................................................288
HTML Documents ...........................................................................................289
Dynamic HTML Generation ...........................................................................289
Conclusions ......................................................................................................290
C HAPTER 14. M ODELING C OMPONENTS WITH CORBA ......................................290
CORBA Overview ............................................................................................291
The ORB ...........................................................................................................294
GIOP and IIOP .................................................................................................296
Services, Facilities, and Business Objects .................................................298
IDL .....................................................................................................................302
Objects by Value .............................................................................................308
Conclusions ......................................................................................................313
C HAPTER 15. CORBA C OMMUNICATIONS ...........................................................313
The Very Distributed CORBA ........................................................................314
T HE J2EE AND CORBA ...................................................................................315
CORBA Vendors .............................................................................................316
Java IDL ............................................................................................................318
CORBA Interfaces ...........................................................................................319
CORBA Servers and Skeletons ....................................................................321
Implementation Repository ............................................................................333
Object Adapters ...............................................................................................333
Interface Repository ........................................................................................337
CORBA Clients and Stubs .............................................................................341
CORBA Naming ..............................................................................................346
Conclusions ......................................................................................................348
Building Java Enterprise Systems with J2EE
C HAPTER 16. RMI C OMMUNICATIONS ..................................................................349
RMI Basics .......................................................................................................349
T HE J2EE AND RMI ..............................................................................................350
JRMP .................................................................................................................354
RMI and IIOP ...................................................................................................355
RMI/IIOP V ERSUS J AVA IDL ................................................................................355
Java-to-IDL Mapping ......................................................................................356
Objects by Value and RMI .............................................................................357
RMI Interfaces ..................................................................................................357
RMI Servers and Skeletons ...........................................................................360
RMI Registration ..............................................................................................372
RMI Clients and Stubs ....................................................................................380
RMI Lookup ......................................................................................................385
RMI Object Activation .....................................................................................386
Custom Sockets ..............................................................................................392
Conclusions ......................................................................................................394
C HAPTER 17. M ODELING C OMPONENTS WITH COM/DCOM ..............................394
COM and DCOM in a Nutshell ......................................................................395
COM/DCOM Services ....................................................................................399
Interface Definition Language .......................................................................400
Conclusions ......................................................................................................403
C HAPTER 18. DCOM C OMMUNICATIONS .............................................................404
DCOM in the Machine ....................................................................................404
DCOM Interfaces .............................................................................................406
DCOM Identifiers .............................................................................................408
DCOM Types ...................................................................................................409
DCOM Servers and Skeletons ......................................................................409
DCOM Server Registration ............................................................................422
DCOM Clients and Stubs ...............................................................................425
DCOM Client Registration and Spawning ...................................................427
DCOM Bridging ................................................................................................428
Conclusions ......................................................................................................428
P ART IV: C OMMON S ERVICES FOR D ISTRIBUTED E NTERPRISE C OMMUNICATIONS
................................................................................................................................430
IN THIS PART ................................................................................................430
C HAPTER 19. N AMING S ERVICES .........................................................................431
Naming Services in a Nutshell ......................................................................431
JNDI Naming Services ...................................................................................433
T HE J2EE AND JNDI .........................................................................................437
Naming Files ....................................................................................................453
CORBA Naming ..............................................................................................455
RMI Naming .....................................................................................................462
DNS ...................................................................................................................468
DCOM Naming ................................................................................................470
Conclusions ......................................................................................................472
C HAPTER 20. D IRECTORY AND T RADING S ERVICES ............................................472
Directory and Trading Services in a Nutshell .............................................473
JNDI Directory Services .................................................................................474
NIS as a Directory Service .............................................................................481
NDS as a Directory Service ...........................................................................482
Zgłoś jeśli naruszono regulamin