EJB Design Patterns: Advanced Patterns, Processes, and Idioms

Foreword. Introduction. Acknowledgments. About the Contributors. Part One: EJB Pattern Language. Chapter 1 EJB Layer Architectural Patterns. Session Facade. Message Facade. EJB Command. Data Transfer Object Factory. Generic Attribute Access. Business Interface. Chapter 2 Inter--Tier Data Transfer Patterns. Data Transfer Object. Domain Data Transfer Object. Custom Data Transfer Objects. Data Transfer HashMap. Data Transfer RowSet.Chapter 3 Transaction and Persistence Patterns. Version Number. JDBC for Reading. Data Access Command Beans. Dual Persistent Entity Bean. Chapter 4 Client--Side EJB Interaction Patterns. EJBHomeFactory. Business Delegate. Chapter 5 Primary Key Generation Strategies. Sequence Blocks. UUID for EJB. Stored Procedures for Autogenerated Keys. Part Two: Best Practices for EJB Design and Implementation. Chapter 6 From Requirements to Pattern--Driven Design. TheServerSide's Forum Messaging System Use Cases. A Quick Referesher on Design Issues and Terminology What Is a Domain Model? Understanding the Layers in a J2EE System. Pattern--Driven EJB Architectures. Domain and Persistence Layer Patterns. Services Layer Patterns. Asychronous Use Cases. Synchronous Use Cases. Other Services Layer Patterns. Inter--Tier Data Transfer Patterns. Application Layer Patterns. Summary. Chapter 7 EJB Development Process: Building with Ant and Unit Testing with Junit. Order of Development. Layer--Independent Code. Domain First. Persistence Second. Services Third. Clients Last. Automating Environment Administration with Ant. What Is a J2EE Application Environment? What Does It Mean to Administer a J2EE Application Environment? Using Ant. Unit Testing with JUnit. Summary. Chapter 8 Alternatives to Entity Beans. Entity Beans Features. Entity Beans and Cognitive Dissonance. In Defense of Entity Beans. Alternatives to Entity Beans. Use Straight JDBC/Stored Procedures. Use a Third Party O/R Mapping Product. Build a Custom Persistence Framework. Use Java Data Objects. An EJB Developer's Introduction to Java Data Objects. Class Requirements and Dependencies. Build and Deployment Processes. Inheritance. Client APIs. Dynamic versus Static Discovery Mechanisms. An EJB Developer's Guide to Using JDO. Preparing Your EJB Environment. Configuring Session Beans. Executing Use Cases and Transaction Management. Container--Managed Transactions. Bean--Managed Transactions. Caching/Lazy Loading and Reference Navigation. Finding Java Data Objects. Inter--Tier Data Transfer. Summary. Chapter 9 EJB Design Strategies, Idioms, and Tips. Don't Use the Composite Entity Bean Pattern. Use a Field--Naming Convention to Allow for Validation in EJB 2.0 CMP Entity Beans. Don't Get and Set Value/Data Transfer Objects on Entity Beans.Using Java Singletons Is OK If They're Used Correctly. Prefer Scheduled Updates to Real--Time Computation. Use a Serialized Java Class to Add Compiler Type Checking to Message--Driven Bean Interactions. Always Call setRollbackOnly when Application Exceptions Occur. Limit Parameters to ejbCreate. Don't Use Data Transfer Objects in ejbCreate. Don't Use XML to Communicate as a DTO Mechanism Unless You Really, Really Have To. Appendix: Pattern Code Listing. References. Index.