In this blog, 25.000 books will be uploaded, so far more than 1400 books are available. Books, will be added daily, please check this blog daily.
Tuesday, March 9, 2010
J2EE Applications and BEA Weblogic Server
Table of Content
Copyright........................................................................................................................................... 2
Credits............................................................................................................................................................ 2
Table of Content................................................................................................................................ 4
Foreword ........................................................................................................................................... 8
Preface ............................................................................................................................................. 10
Introducing BEA WebLogic Application Servers ......................................................................................... 10
Why We Wrote this Book.............................................................................................................................11
Brief Overview of the Book.......................................................................................................................... 12
Acknowledgments ....................................................................................................................................... 13
Chapter 1. Introduction............................................................................................................ 17
What Is BEA WebLogic Server? .................................................................................................................. 17
WebLogic Server Overview......................................................................................................................... 17
How to Use this Book.................................................................................................................................. 20
System Requirements .................................................................................................................................. 23
Chapter 2. Overview of J2EE Technologies .................................................................................. 26
WebLogic Server and J2EE .......................................................................................................................... 26
Presentation Logic ....................................................................................................................................... 26
Database and Transaction Support................................................................................................................ 28
Object Registry and Remote Method Invocation (RMI) .............................................................................. 29
Enterprise JavaBeans (EJBs) ........................................................................................................................ 30
Java Message Service (JMS) ........................................................................................................................ 32
JavaMail ...................................................................................................................................................... 33
Security........................................................................................................................................................ 33
About WebAuction...................................................................................................................................... 33
Chapter 3. Building Presentation Logic with WebLogic Server Servlets ................................... 35
Introducing WebLogic Server Servlets......................................................................................................... 35
WebLogic Server JavaServer Pages (JSPs) .................................................................................................. 37
Servlets and Web Sessions........................................................................................................................... 65
The Web Application Package...................................................................................................................... 87
Using Servlets with WebLogic Server Clustering....................................................................................... 103
Best Practices for Servlets .......................................................................................................................... 105
Chapter 4. Using WebLogic Server JavaServer Pages............................................................... 107
About WebLogic Server JSPs..................................................................................................................... 107
JSP Basics.................................................................................................................................................. 109
The Lifecycle of a JSP................................................................................................................................112
JSP Page Elements......................................................................................................................................113
Using Java Beans with JSPs ....................................................................................................................... 130
Custom Tag Libraries................................................................................................................................. 146
Error Pages, Comments, and Deployment Descriptors............................................................................... 152
Using Servlets and JSPs Together: Model View Controller........................................................................ 154
Best Practices for Debugging and Developing JSPs................................................................................... 155
Best Practices for JSPs............................................................................................................................... 156
JSPs in the WebAuction Application .......................................................................................................... 156
Browsing the WebAuction Code ................................................................................................................ 161
Chapter 5. Using Databases and Transactions with JDBC and JTA........................................ 162
WebLogic Server JDBC............................................................................................................................. 162
Using the JTA Driver ................................................................................................................................. 194
WebLogic Server and Distributed Transactions.......................................................................................... 203
Error Handling and SQL Warnings............................................................................................................. 208
Metadata .................................................................................................................................................... 210
Advanced Features......................................................................................................................................211
Best Practices for JDBC ......................................................................................................................... 214
Chapter 6. Remote Method Invocation and Distributed Naming............................ 219
Remote Method Invocation ........................................................................................................................ 219
Serialization ............................................................................................................................................... 221
Using RMI in Distributed Applications ...................................................................................................... 224
JNDI: Java's Naming Service ..................................................................................................................... 226
JNDI, Security, and Identity ....................................................................................................................... 229
JNDI and Clustering .................................................................................................................................. 230
JNDI Best Practices ................................................................................................................................... 233
Chapter 7. Enterprise Messaging with the Java Message Service (JMS)............. 236
Benefits of JMS ......................................................................................................................................... 236
JMS Fundamentals .................................................................................................................................... 237
Sample JMS Queue Producer/Consumer.................................................................................................... 239
Sample JMS Topic Producer/Consumer ..................................................................................................... 245
JMS Messages ........................................................................................................................................... 249
Message Types........................................................................................................................................... 251
JMS and Transactions ................................................................................................................................ 258
Clustering JMS .......................................................................................................................................... 261
Exception Listeners ................................................................................................................................... 263
Using Multicast JMS ................................................................................................................................. 263
JMS Best Practices .................................................................................................................................... 266
Conclusion ................................................................................................................................................. 268
Chapter 8. Using Session Enterprise JavaBeans ........................................................................ 269
Enterprise JavaBeans Overview ................................................................................................................. 269
Basics of EJBs ........................................................................................................................................... 269
Stateless Session EJBs............................................................................................................................... 278
Stateful Session EJBs ................................................................................................................................ 283
Using Transactions with Session Beans ..................................................................................................... 290
EJB Security .............................................................................................................................................. 294
EJB Environment....................................................................................................................................... 297
EJB References.......................................................................................................................................... 298
Resource Manager References.................................................................................................................... 299
Handles...................................................................................................................................................... 301
Cars Example............................................................................................................................................. 303
Best Practices ............................................................................................................................................ 315
Conclusion ................................................................................................................................................. 321
Chapter 9. Entity EJBs ................................................................................................................. 322
Rationale for Entity EJBs ........................................................................................................................... 322
Entity Bean Basics..................................................................................................................................... 322
CMP Entity Bean Example........................................................................................................................ 325
CMP........................................................................................................................................................... 331
Container-Managed Entity Bean Lifecycle ................................................................................................ 333
Introduction to CMRs................................................................................................................................ 334
Writing EJB-QL for CMP Finders.............................................................................................................. 347
BMP Entity Beans ..................................................................................................................................... 350
Advanced Topics for Writing Entity EJBs.................................................................................................. 365
Entity Bean Inheritance and Polymorphism............................................................................................... 367
Entity Beans and Locking .......................................................................................................................... 370
Using Read-Only Entity Beans................................................................................................................... 375
BMP vs. CMP............................................................................................................................................ 378
Conclusion ................................................................................................................................................. 381
Chapter 10. Using Message-Driven EJBs.................................................................................... 382
Message-Driven EJB Basics....................................................................................................................... 382
Message-Driven EJB Example .............................................................................................................. 383
Message-Driven Beans and Concurrency................................................................................................... 388
Using Transactions with Message-Driven Beans ....................................................................................... 389
Message Acknowledgment ......................................................................................................................... 391
New Customer Example ............................................................................................................................. 392
Message-Driven EJB Advantages............................................................................................................... 396
Conclusion ................................................................................................................................................. 398
Chapter 11. Interfacing with Internet Mail Using WebLogic Server JavaMail....................... 399
About Email............................................................................................................................................... 399
About JavaMail.......................................................................................................................................... 400
Using JavaMail to Send Simple Email ....................................................................................................... 403
Adding Email Capability to the WebAuction Application.......................................................................... 410
JavaMail Best Practices..............................................................................................................................411
Chapter 12. Developing Security with WebLogic Server JNDI and JAAS .............................. 412
Security Technology Overview .................................................................................................................. 412
Creating Secure Web Applications ............................................................................................................. 418
Programming to the Caching Realm in Web Applications ......................................................................... 434
NewUser.jsp Example................................................................................................................................ 436
Developing Browser-Based Authentication................................................................................................ 446
Programmatic Security in Web Applications .............................................................................................. 448
Developing Secure Application Clients ...................................................................................................... 450
Using WebLogic Server JNDI for Application Client Security .................................................................. 455
About WebLogic SSL................................................................................................................................ 463
Web Clients: Using SSL Security............................................................................................................... 467
Application Clients: Using SSL Security.................................................................................................... 471
WebLogic Server Security Best Practices .................................................................................................. 472
Putting It All Together ............................................................................................................................... 472
Securing the WebAuction Application........................................................................................................ 474
Chapter 13. Designing the Production Deployment ................................................................... 475
Designing for Deployment ......................................................................................................................... 475
WebLogic Deployment Scenarios: Case Studies ........................................................................................ 476
Types of Client Software ............................................................................................................................ 476
Using a DMZ and Firewalls in a Web Deployment .................................................................................... 479
Integrating Web Deployments with Data Stores ......................................................................................... 480
Using WebLogic Server Clustering in a Web Deployment......................................................................... 481
Web Application Deployment Details......................................................................................................... 487
Application Deployments ........................................................................................................................... 489
Mixed Deployments .................................................................................................................................. 491
Application Deployment Process ............................................................................................................... 493
Best Practices for Deploying WebLogic Server.......................................................................................... 498
Chapter 14. The WebAuction Application .................................................................................. 501
Application Architecture and Design: WebAuction.............................................................................. 501
Business Logic Design ............................................................................................................................... 509
Changes Required for a Production Application......................................................................................... 513
Assembling the Application Components: WebAuction............................................................................. 514
Quick Deployment of the WebAuction Application................................................................................... 519
Deploying the WebAuction Application: In Detail ..................................................................................... 520
Deploying the WebAuction on Another Database ...................................................................................... 541
Testing the WebAuction Application .......................................................................................................... 544
Chapter 15. Capacity Planning for the WebLogic Server.......................................................... 561
Analysis of Capacity Planning.................................................................................................................... 561
Methodology and Metrics for Capacity Planning ....................................................................................... 562
Capacity Planning Best Practices ............................................................................................................... 571
Download this book click here
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment