You are on page 1of 10

Building Java Enterprise Systems with J2EE

CONTENTS
ABOUT THE AUTHORS ...............................................................................................2
ACKNOWLEDGMENTS .................................................................................................2
TELL US W HAT YOU THINK! ......................................................................................3
INTRODUCTION ...........................................................................................................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
PART I: ENTERPRISE FOUNDATIONS .......................................................................10
IN THIS PART..................................................................................................10
CHAPTER 1. ENTERPRISE ARCHITECTURAL OVERVIEW .........................................10
The Enterprise ...................................................................................................11
Enterprise Components ...................................................................................13
Information Technology in the Enterprise .....................................................14
Conclusions........................................................................................................16
CHAPTER 2. OBJECT-ORIENTED SOFTWARE DEVELOPMENT FOR THE ENTERPRISE
..................................................................................................................................16
Enterprise Objects.............................................................................................17
The Object-Oriented Development Process .................................................20
Unified Modeling Language.............................................................................25
Conclusions........................................................................................................32
CHAPTER 3. COMPONENT-BASED SOFTWARE DEVELOPMENT FOR THE
ENTERPRISE .............................................................................................................32
Enterprise Components ...................................................................................32
Component Models...........................................................................................34
Component-Based Development ...................................................................38
Standards ...........................................................................................................40
Conclusions........................................................................................................43
CHAPTER 4. JAVA FOUNDATIONS FOR ENTERPRISE DEVELOPMENT .....................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
CHAPTER 5. JAVA ENTERPRISE SYSTEM ARCHITECTURE WITH THE J2EE ...........82
The J2EE Model................................................................................................83
J2SE V1.2 VERSUS J2SE V1.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
CHAPTER 6. ENTERPRISE USER INTERFACING .......................................................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
CHAPTER 7. MODELING COMPONENTS WITH JAVABEANS ...................................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
PART II: ENTERPRISE DATA ENABLING .................................................................132
IN THIS PART................................................................................................132
CHAPTER 8. ENTERPRISE DATA ............................................................................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
CHAPTER 9. BASIC JDBC .....................................................................................151
JDBC Architecture...........................................................................................152
JDBC Drivers and their Types.......................................................................155
THE J2EE AND JDBC DRIVER TYPE SELECTION ............................................155
JDBC Driver Configuration ............................................................................159
THE J2EE AND JDBC DRIVER CONFIGURATION .............................................159
JDBC Connections..........................................................................................162
THE J2EE AND JDBC CONNECTIONS ..............................................................162
JDBC Statements............................................................................................167
JDBC Result Sets............................................................................................176
SQL and Java Mappings................................................................................183
JDBC MetaData...............................................................................................184
Conclusions......................................................................................................189
CHAPTER 10. ADVANCED 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
THE J2EE AND JDBC 2.0 ................................................................................231
Connection Pools ............................................................................................233
Distributed Transactions ................................................................................235
Conclusions......................................................................................................236
PART III: ENTERPRISE DATA ENABLING ................................................................238
IN THIS PART................................................................................................238
CHAPTER 11. DISTRIBUTED ENTERPRISE COMMUNICATIONS ..............................239
Distributed Systems ........................................................................................239
Distribution Mechanisms ................................................................................241
The Network Client..........................................................................................243
The Network Server........................................................................................244
Conclusions......................................................................................................246
CHAPTER 12. NETWORK COMMUNICATIONS ........................................................246
Network Computing ........................................................................................247
TCP/IP Protocol Suite.....................................................................................249
JAVA SOCKET PROGRAMMING AND THE J2EE .................................................255
CHAPTER 13. WEB COMMUNICATIONS .................................................................275
The Internet and the World Wide Web ........................................................275
HTTP .................................................................................................................278
CGI ....................................................................................................................287
Servlets .............................................................................................................288
HTML Documents ...........................................................................................289
Dynamic HTML Generation ...........................................................................289
Conclusions......................................................................................................290
CHAPTER 14. MODELING COMPONENTS 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
CHAPTER 15. CORBA COMMUNICATIONS ...........................................................313
The Very Distributed CORBA........................................................................314
THE 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

CHAPTER 16. RMI COMMUNICATIONS ..................................................................349


RMI Basics .......................................................................................................349
THE J2EE AND RMI ..............................................................................................350
JRMP.................................................................................................................354
RMI and IIOP ...................................................................................................355
RMI/IIOP VERSUS JAVA 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
CHAPTER 17. MODELING COMPONENTS WITH COM/DCOM ..............................394
COM and DCOM in a Nutshell......................................................................395
COM/DCOM Services ....................................................................................399
Interface Definition Language .......................................................................400
Conclusions......................................................................................................403
CHAPTER 18. DCOM COMMUNICATIONS .............................................................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
PART IV: COMMON SERVICES FOR DISTRIBUTED ENTERPRISE COMMUNICATIONS
................................................................................................................................430
IN THIS PART................................................................................................430
CHAPTER 19. NAMING SERVICES .........................................................................431
Naming Services in a Nutshell ......................................................................431
JNDI Naming Services ...................................................................................433
THE J2EE AND JNDI.........................................................................................437
Naming Files ....................................................................................................453
CORBA Naming ..............................................................................................455
RMI Naming .....................................................................................................462
DNS ...................................................................................................................468
DCOM Naming ................................................................................................470
Conclusions......................................................................................................472
CHAPTER 20. DIRECTORY AND TRADING SERVICES ............................................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

Building Java Enterprise Systems with J2EE

LDAP as a Directory Service.........................................................................484


CORBA as a Trading Service........................................................................496
Jini as a Trading Service................................................................................502
Microsoft Active Directory Services..............................................................513
Conclusions......................................................................................................514
CHAPTER 21. ACTIVATION SERVICES ................................................................514
Activation Services Overview .................................................................515
RMI Activation Framework.......................................................................517
CORBA Activation Framework ................................................................519
CORBA Lifecycle Service...........................................................................522
DCOM Activation Framework ..................................................................524
JavaBeans Activation Framework .........................................................526
Web and Application Activation Frameworks ...................................528
Conclusions....................................................................................................529
CHAPTER 22. MESSAGING SERVICES .................................................................530
Messaging Overview ..................................................................................531
MOM..................................................................................................................536
Java Message Service................................................................................539
THE J2EE AND JMS.........................................................................................542
CORBA Messaging .......................................................................................578
JavaMail...........................................................................................................587
THE J2EE AND JAVAMAIL ....................................................................................600
Conclusions....................................................................................................617
CHAPTER 23. TRANSACTION SERVICES .............................................................618
Transactions ..................................................................................................619
Transaction Services ..................................................................................624
Object Transaction Service......................................................................629
Java Transactions API................................................................................635
JTA Transaction Manager Interface......................................................636
JTA Application Interface .........................................................................638
JTA and X/Open XA ....................................................................................640
Java Transactions Service........................................................................642
Conclusions....................................................................................................643
PART V: ENTERPRISE SYSTEMS ASSURANCE .....................................................645
IN THIS PART................................................................................................645
CHAPTER 24. HIGH-ASSURANCE ENTERPRISE APPLICATIONS.........................646
What Is Assurance?....................................................................................646
General Assurance Process .....................................................................650
To Be Assured or Not to Be Assured? .................................................654
Security ...........................................................................................................656
Reliability ........................................................................................................658
Availability......................................................................................................660
Maintainability ..............................................................................................662
Safety...............................................................................................................664
Conclusions....................................................................................................665
CHAPTER 25. SECURITY BASICS ........................................................................666
The Basic Security Model .........................................................................667

Building Java Enterprise Systems with J2EE

Cryptography ................................................................................................668
Authentication and Nonrepudiation......................................................673
Secure Socket Layer (SSL)......................................................................678
Access Control ..............................................................................................679
Domains ..........................................................................................................681
Auditing ...........................................................................................................682
Policies and Administration .....................................................................682
Conclusions....................................................................................................683
CHAPTER 26. BASIC JAVA SECURITY .................................................................684
The History of Security in Java ..............................................................685
Java Security Architecture.......................................................................687
Byte Code Verifier .......................................................................................691
Class Loader ..................................................................................................692
Security Manager ........................................................................................698
Java Cryptography Architecture ............................................................703
Conclusions....................................................................................................708
CHAPTER 27. ADVANCED JAVA SECURITY .........................................................708
Permissions....................................................................................................709
Security Policies ...........................................................................................717
Java Access Control....................................................................................723
Principal Identification...............................................................................734
Protecting Objects.......................................................................................744
Signing Code .................................................................................................753
Java Security Extensions..........................................................................758
Conclusions....................................................................................................765
CHAPTER 28. CORBA SECURITY .......................................................................766
CORBA Security Overview .......................................................................768
DIGESTING THE CORBA SECURITY SERVICE SPECIFICATION .........................768
Authentication ..............................................................................................775
Delegation ......................................................................................................780
Authorization.................................................................................................781
Auditing ...........................................................................................................783
Nonrepudiation.............................................................................................785
Encryption ......................................................................................................789
Security Policies ...........................................................................................791
Security Administration ............................................................................792
Conclusions....................................................................................................793
PART VI: ENTERPRISE WEB ENABLING ..............................................................794
IN THIS PART................................................................................................794
CHAPTER 29. WEB BROWSERS AND SERVERS IN THE ENTERPRISE ................795
Web Browsers...............................................................................................795
Web Browser Security ...............................................................................798
Java Plug-in ...................................................................................................801
Web Servers..................................................................................................804
Web Server Security ..................................................................................807
Web Server Availability.............................................................................811
Conclusions....................................................................................................812

Building Java Enterprise Systems with J2EE

CHAPTER 30. TRADITIONAL WEB PROGRAMMING AND JAVA ...........................812


HTML Programming ....................................................................................813
CGI Programming .......................................................................................824
Scripting Languages...................................................................................830
Active Server Pages ...................................................................................836
Java-Based Web Programming ..............................................................837
Conclusions....................................................................................................839
CHAPTER 31. XML...............................................................................................839
XML Overview ...............................................................................................840
XML Formatting............................................................................................842
DTD Declaration...........................................................................................849
Hyperlinking in XML....................................................................................858
XML Style Sheets.........................................................................................863
Simple API for XML.....................................................................................866
Document Object Model ...........................................................................882
Java and XML ................................................................................................897
Conclusions....................................................................................................902
CHAPTER 32. JAVA SERVLETS .............................................................................903
Servlet Architecture ...................................................................................904
Servlet Interfaces........................................................................................906
Servlet HTTP Interfaces............................................................................915
Request Processing.....................................................................................923
Response Generation.................................................................................936
Session Management.................................................................................945
Servlet Deployment....................................................................................953
Servlet Configuration.................................................................................968
Servlet Service Management..................................................................972
Conclusions....................................................................................................981
CHAPTER 33. JAVASERVER PAGES .....................................................................982
JSP Overview ................................................................................................983
JSP Language Basics..................................................................................988
JSP Translation and Compilation Directives......................................991
Java Scripting from JSP ............................................................................997
Java Abstractions of JSP.........................................................................1000
Standard Java Objects from JSP .........................................................1007
Standard Java Actions from JSP..........................................................1013
JSP Configuration and Deployment....................................................1026
Custom Java Actions and Tags from JSP .........................................1033
Conclusions..................................................................................................1038
PART VII: ENTERPRISE APPLICATIONS ENABLING ..........................................1040
IN THIS PART..............................................................................................1040
CHAPTER 34. ENTERPRISE APPLICATION PLATFORMS ....................................1041
Enterprise Platforms Overview ............................................................1042
TP Monitor Platforms................................................................................1043
OTMs ..............................................................................................................1044
Generic Application Frameworks.........................................................1046
Standard Java-Based Generic Application Framework...............1048

Building Java Enterprise Systems with J2EE

CORBAcomponents...................................................................................1050
Microsoft's Generic Application Framework ....................................1051
Application-Specific Platforms..............................................................1053
Enterprise Application Management ..................................................1054
Conclusions..................................................................................................1055
CHAPTER 35. APPLICATION SERVERS AND ENTERPRISE JAVABEANS............1056
Standalone Enterprise Applications....................................................1057
Application ServerBased Enterprise Applications.......................1059
Application Server Architecture Provider Roles.............................1062
Application Server Components ..........................................................1064
Application Server Client Interfaces ..................................................1068
Application Server Client Implementations ....................................1070
Enterprise Application Configuration and Deployment...............1075
Application Service Management ........................................................1079
Conclusions..................................................................................................1081
CHAPTER 36. MODELING COMPONENTS WITH ENTERPRISE JAVABEANS ......1082
EJB Overview ..............................................................................................1083
EJB Configuration and Deployment Basics......................................1095
Session Bean Server Components .....................................................1102
Session Bean Client Interfaces ............................................................1117
Session Bean Configuration and Deployment................................1129
EJB and JDBC..............................................................................................1133
Entity Bean Server Components .........................................................1135
Entity Bean Client Interfaces................................................................1157
Entity Bean Configuration and Deployment ...................................1166
Conclusions..................................................................................................1173
CHAPTER 37. ADVANCED ENTERPRISE JAVABEANS SERVING .......................1174
EJB Transactions........................................................................................1175
EJB Security.................................................................................................1185
EJB SECURITY AUTHENTICATION MODEL LIMITATIONS .............................1191
EJB/Web Connectivity..............................................................................1194
EJB/CORBA Connectivity ........................................................................1203
EJB and XML................................................................................................1206
EJB and JMS ................................................................................................1209
EJB and JavaMail .......................................................................................1215
Conclusions..................................................................................................1218
CHAPTER 38. ENTERPRISE APPLICATION INTEGRATION .................................1218
Enterprise Application Integration Overview..................................1219
EAI with JNI.................................................................................................1221
EAI with Distributed Enterprise Communication Paradigms ....1225
EAI with Messaging Services and JMS ..............................................1230
EAI with XML ...............................................................................................1231
EAI with J2EE Connectors......................................................................1233
Embedded Applications Integration ...................................................1235
Conclusions..................................................................................................1237
PART VIII: APPENDIXES....................................................................................1238
IN THIS PART..............................................................................................1238

Building Java Enterprise Systems with J2EE

APPENDIX A. SOFTWARE CONFIGURATION ......................................................1239


Software on the CD ..................................................................................1239
Software Configuration per Chapter ..................................................1241
J2SE Configuration ...................................................................................1242
J2EE Configuration....................................................................................1242
Java Environment Variable Configuration .......................................1243
Microsoft Java Configuration.................................................................1243
BEA WebLogic Server Configuration..................................................1244
Sample Software Configuration...........................................................1245
Database Configuration ..........................................................................1246
Web Configuration ....................................................................................1257
Application Server Configuration ........................................................1260
JavaBeans Configuration ........................................................................1263
XML Configuration.....................................................................................1264
CORBA ORB Configuration.....................................................................1264
CORBA Services Configuration.............................................................1264
RMI/IIOP Configuration...........................................................................1265
JNDI Configuration....................................................................................1266
LDAP Configuration...................................................................................1267
Jini Configuration.......................................................................................1268
JMS Configuration .....................................................................................1268
JavaMail Configuration ............................................................................1269
APPENDIX B. ADDITIONAL RESOURCES ...........................................................1270
Object-Oriented and Component-Based Software Development
..........................................................................................................................1270
Java Basics...................................................................................................1271
J2EE Basics ..................................................................................................1271
User Interfacing .........................................................................................1271
JavaBeans ....................................................................................................1272
Database Development and JDBC ......................................................1272
General Distributed Communications and TCP/IP........................1273
CORBA ...........................................................................................................1273
RMI..................................................................................................................1273
COM/DCOM ..................................................................................................1274
JNDI, Naming, Directory, Trading, and Jini Services ..................1274
MOM, JMS, and JavaMail ........................................................................1275
Distributed Transactions, JTA, and JTS ............................................1275
General Assurance and Security .........................................................1276
General Web, HTML, and Scripting ....................................................1276
XML .................................................................................................................1277
Java Servlets and JSP..............................................................................1277
Application Serving and EAI..................................................................1277
Enterprise JavaBeans...............................................................................1278

To access for fully document please click here.

You might also like