Acknowledgments p. xvi Introduction p. xvii Overview p. 1 Overview p. 3 The Motivation for Enterprise JavaBeans p. 4 Component Architectures p. 7 Divide and Conquer to the Extreme with Reusable Services p. 9 Introducing Enterprise JavaBeans p. 11 The EJB Ecosystem p. 15 The Java 2 Platform, Enterprise Edition (J2EE) p. 21 Summary p. 2 EJB Fundamentals p. 27 Enterprise Beans p. 27 Distributed Objects: The Foundation for EJB p. 30 Distributed Objects and Middleware p. 32 What Constitutes an Enterprise Bean? p. 36 Summary p. 52 Writing Your First Bean p. 53 How to Develop an EJB Component p. 54 The Remote Interface p. 55 The Local Interface p. 56 The Home Interface p. 57 The Local Home Interface p. 59 The Bean Class p. 61 The Deployment Descriptor p. 64 The Vendor-Specific Files p. 65 The Ejb-jar File p. 65 Deploying the Bean p. 66 The Optional EJB Client JAR File p. 67 Understanding How to Call Beans p. 68 Running the System p. 72 Implementing Component Interfaces p. 73 Summary p. 75 The Triad of Beans p. 77 Introduction to Session Beans p. 79 Session Bean Lifetime p. 79 Session Bean Subtypes p. 80 Special Characteristics of Stateful Session Beans p. 83 Summary p. 102 Writing Session Bean Web Services p. 103 Web Services Concepts p. 103
Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p. 119 What Is an Entity Bean? p. 122 Features of Entity Beans p. 125 Entity Contexts p. 137 Summary p. 139 Writing Bean-Managed Persistent Entity Beans p. 141 Entity Bean Coding Basics p. 141 Bean-Managed Persistence Example: A Bank Account p. 150 Running the Client Program p. 175 Putting It All Together: Walking through a BMP Entity Bean's Life Cycle p. 177 Summary p. 180 Writing Container-Managed Persistent Entity Beans p. 181 Features of CMP Entity Beans p. 181 Implementation Guidelines for Container-Managed Persistence p. 191 Container-Managed Persistence Example: A Product Line p. 196 Running the Client Program p. 214 The Life Cycle of a CMP Entity Bean p. 214 Summary p. 216 Introduction to Message-Driven Beans p. 217 Motivation to Use Message-Driven Beans p. 217 The Java Message Service p. 219 Integrating JMS with EJB p. 226 Developing Message-Driven Beans p. 231 Advanced Concepts p. 241 JMS Message-Driven Bean Gotchas p. 244 Summary p. 254 Adding Functionality to Your Beans p. 255 Calling Beans from Other Beans p. 255 Resource Factories p. 259 Environment Properties p. 262 Understanding Handles p. 263 Summary p. 265 Advanced Enterprise JavaBeans Concepts p. 267 EJB Best Practices p. 269 When to Use EJB p. 270 How to Choose a Web Application Framework to Work with EJB p. 272 Applying Model Driven Development in EJB Projects p. 275
Applying Extreme Programming in EJB Projects p. 277 Testing EJB p. 279 Implementing Client-Side Callback Functionality in EJB p. 282 Choosing Between Servlets and Stateless Session Beans as Service Endpoints p. 284 Considering the Use of Aspect-Oriented Programming Techniques in EJB Projects p. 284 Reflection, Dynamic Proxy, and EJB p. 287 Deploying EJB Applications to Various Application Servers p. 288 Debugging EJB p. 290 Inheritance and Code Reuse in EJB p. 291 Writing Singletons in EJB p. 293 When to Use XML with EJB p. 293 When to Use Messaging Versus RMI-IIOP p. 294 Summary p. 297 Transactions p. 299 Motivation for Transactions p. 300 Benefits of Transactions p. 303 Transactional Models p. 306 Enlisting in Transactions with Enterprise JavaBeans p. 310 Container-Managed Transactions p. 317 Programmatic Transactions in EJB p. 324 Transactions from Client Code p. 330 Transactional Isolation p. 331 Distributed Transactions p. 340 Designing Transactional Conversations in EJB p. 343 J2EE Transaction Service and Extended Transactions p. 346 Summary p. 348 Security p. 349 Introduction p. 350 Web Application Security p. 353 Understanding EJB Security p. 357 Secure Interoperability p. 378 Web Services Security p. 381 Summary p. 389 EJB Timers p. 391 Scheduling p. 391 EJB and Scheduling p. 392 The EJB Timer Service p. 394 Timer Example: CleanDayLimitOrdersEJB p. 399 Strengths and Limitations of EJB Timer Service p. 406 Summary p. 408 BMP and CMP Relationships p. 409
The CMP and BMP Difference p. 410 Cardinality p. 411 Directionality p. 428 Lazy Loading p. 433 Aggregation Versus Composition and Cascading Deletes p. 434 Relationships and EJB-QL p. 436 Recursive Relationships p. 437 Circular Relationships p. 438 Referential Integrity p. 439 Summary p. 444 Persistence Best Practices p. 445 Comparing Entity Beans with Other Persistence Approaches p. 446 Choosing Between CMP and BMP p. 450 Choosing the Right Granularity for Entity Beans p. 453 Persistence Tips and Tricks p. 454 Summary p. 475 EJB Integration p. 477 Why Does Integration Matter? p. 477 EJB and Integration p. 479 J2EE Connector Architecture p. 480 The J2EE Connector API p. 486 System Contracts p. 494 Connector Example: OutboundLoanRA p. 508 Integration Best Practice: When to Use Which Technology p. 541 Summary p. 543 EJB Performance Optimizations p. 545 It Pays to Be Proactive! p. 545 The Stateful Versus Stateless Debate from a Performance Point of View p. 547 How to Guarantee a Response Time with Capacity Planning p. 549 Use Session Facade for Better Performance p. 550 Choosing Between Local Interfaces and Remote Interfaces p. 552 Partitioning Your Resources p. 553 Tuning Stateless Session Beans p. 554 Tuning Stateful Session Beans p. 555 Tuning Entity Beans p. 556 Tuning Message-Driven Beans p. 563 Tuning Java Virtual Machine p. 563 Miscellaneous Tuning Tips p. 565 Choosing the Right EJB Server p. 567 Summary p. 568 Clustering p. 569
Overview of Large-Scale Systems p. 569 Instrumenting Clustered EJBs p. 578 Other EJB Clustering Issues p. 589 Summary p. 591 Starting Your EJB Project on the Right Foot p. 593 Get the Business Requirements Down p. 593 Decide Whether J2EE Is the Right Choice p. 594 Staff Your Project p. 598 Design Your Complete Object Model p. 600 Implement a Single Vertical Slice p. 601 Choose an Application Server p. 603 Divide Your Team p. 604 Invest in Tools p. 606 Invest in a Standard Build Process p. 607 Next Steps p. 607 Summary p. 608 Choosing an EJB Server p. 609 J2EE Standard Compliance p. 610 Pluggable JRE p. 610 Conversion Tools p. 610 Complex Mappings p. 611 Third-Party JDBC Driver Support p. 611 Lazy Loading p. 611 Deferred Database Writes p. 611 Pluggable Persistence Providers p. 611 In-Memory Data Cache p. 612 Integrated Tier Support p. 612 Scalability p. 612 High Availability p. 613 Security p. 613 IDE Integration p. 614 UML Editor Integration p. 615 Intelligent Load Balancing p. 615 Stateless Transparent Fail-over p. 615 Clustering p. 616 Java Management Extension (JMX) p. 616 Administrative Support p. 616 Hot Deployment p. 617 Instance Pooling p. 617 Automatic EJB Generation p. 617 Clean Shutdown p. 617
Real-Time Deployment p. 618 Distributed Transactions p. 618 Superior Messaging Architecture p. 618 Provided EJB Components p. 619 Web Services p. 619 Workflow p. 619 Open Source p. 620 Specialized Services p. 620 Nontechnical Criteria p. 621 Summary p. 621 EJB-J2EE Integration: Building a Complete Application p. 623 The Business Problem p. 623 A Preview of the Final Web Site p. 624 Scoping the Technical Requirements p. 630 Example Code p. 643 Summary p. 651 RMI-IIOP and JNDI Tutorial p. 653 CORBA Interoperability p. 683 Deployment Descriptor Reference p. 705 The EJB Query Language (EJB-QL) p. 739 EJB Quick Reference Guide p. 757 Index p. 801 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.