TL;DR: In this paper, the authors describe configuring of clustered web services nodes accessing a common database, including implementing a data virtualization layer at each node to abstract an instance of the database from a web service application.
Abstract: There is disclosed configuring of clustered web services nodes accessing a common database, including implementing a data virtualization layer at each node to abstract an instance of the database from a web service application. In one embodiment, at each node is performed creating a first, data virtualization entity bean having all read and write operations of an application-developed (master) entity bean, creating a second entity bean that carries only the read operations of the master entity bean and addresses the replica instance, receiving an operation request at the first entity bean, and routing a request to either the master entity bean or the second entity bean depending upon the requested operation to access the respective database instance. In another embodiment, at each node is performed implementing an empty database instance having a schema matching the common database, identifying a relevant partitioning in a query utilizing the empty database, and routing the query to a respective partitioned database instance.
TL;DR: In this paper, the replicated and migration capable state for an enterprise Java bean (EJB) application is described, which includes executing a Java application on a server that includes an entity bean.
Abstract: An invention is disclosed managing the replicated and migration capable state for an enterprise Java bean (EJB) application. The invention includes executing a Java application on a server that includes an entity bean. In addition, a replicated state manager is executed that includes program instructions for managing an in-memory state of the Java application, and program instructions for replicating the in-memory state of the Java application to a replicated state server. The replicated state server can be a memory replicated state server, or a disk replicated state server. To facilitate application state management, embodiments of the present invention store states of the entity beans objects using state objects, which are updated in response to changes in the state of the application. Hence, the embodiments of the present invention define a logical separation between the application and the state objects.
TL;DR: This chapter discusses EJB Layer Architectural Patterns, Design Strategies, Idioms, and Tips, and an EJB Developer's Introduction to Java Data Objects.
Abstract: 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.
TL;DR: In this article, read/write entity beans (BEs) are used to update the data item in the database through a cluster server with an invalidation target, which contains identification information relating to copies of data items stored on servers in the cluster.
Abstract: Servers in a network cluster can each store a copy of a data item in local cache, providing read access to these copies through read-only entity beans. The original data item in the database can be updated through a read/write entity bean one of the cluster servers. That cluster server has access to an invalidation target, which contains identification information relating to copies of the data item stored on servers in the cluster. Once the read/write bean updates the data item in the database, an invalidate request can be sent or multicast to all cluster members, or to any read-only bean or server contained in the invalidation target. Each server or read-only bean receiving the request knows to drop any copy of the data item in local cache, and can request a current copy of the data item from the database.
TL;DR: This book discusses the development of the Enterprise JavaBeans Architecture from a Two-Tier to a J2EE Architecture, and the challenges and benefits of using a Message-Driven Bean in the Benefits Application.
Abstract: Foreword. Preface. Conventions Used in This Book. Graphics. Note about the Example Applications. Contents of the Book. Acknowledgments. 1. Advantages of the Enterprise JavaBeans(tm) Architecture. From a Two-Tier to a J2EE Architecture. Two-Tier Application Architecture. Traditional Three-Tier Application Architecture. Early Web-Based Application Architecture. J2EE Application Architecture. Advantages of the Enterprise JavaBeans Architecture. Benefits to the Application Developer. Benefits to Customers. Conclusion. 2. Enterprise JavaBeans Architecture Overview. What Are Enterprise JavaBeans Applications? Client View of Enterprise Beans. Business Entities and Processes, and Enterprise Bean Types. Business Entities. Business Processes. Implementation of Business Rules. Enterprise Bean Types. Session Beans and Entity Beans. Choosing Entity Beans or Session Beans. Using Java Classes Instead of Entity Beans. Message-Driven Beans. Structure of Enterprise Beans. Local and Remote Client Views. Enterprise Bean Home Interfaces. Enterprise Bean Component Interface. Enterprise Bean Class. Deployment Descriptor. Container Tools and Services. Container Artifacts. Container Runtime Services. Conclusion. 3. Enterprise JavaBeans Roles. EJB Roles. Bean Developer. Application Assembler. Deployer. System Administrator. EJB Container Provider. EJB Server Provider. Tools. Conclusion. 4. Working with Session Beans. When to Use Session Beans. Using Session Beans in Web Applications. Using Session Beans in Three-Tier Applications. Understanding the State of a Session Object. Stateful versus Stateless Session Beans. Understanding Conversational State. Overview of the Example Application. User View of the Application. Main Parts of the Application. The Benefits Enrollment Business Process. EnrollmentEJB Stateful Session Bean in Detail. EnrollmentEJB Session Bean Parts. EnrollmentBean Session Bean Class Details. Client Developer's Perspective. PayrollEJB Stateless Session Bean. PayrollEJB Stateless Session Bean Parts. Client Developer's Perspective. Database Schemas. EmployeeDatabase Schema. BenefitsDatabase Schema. PayrollDatabase Schema. Container-Provided Benefits. Conclusion. 5. Session Bean in Its Container. Container Artifacts. How the Container Manages Session Beans at Runtime. EJB Home Interface Lookup. Session Object Creation. Business Method Invocation. Session Bean Passivation and Activation. Session Object Removal. Session Bean Timeout. Conclusion. 6. Enterprise Application Integration Using Message-Driven Beans and Connectors. JMS and Communication Modes. Synchronous and Asynchronous Communication. JMS Overview. Message-Driven Bean Concepts. Implementing a Message-Driven Bean. Message-Driven Beans and Transactions. Message-Driven Bean Usage. Using a Message-Driven Bean in the Benefits Application. PayrollMDB Message-Driven Bean. PayrollEJB Local Interfaces. Using JMS and Connectors for Communication. Using JMS to Communicate With Messaging Systems. Using Connectors to Communicate With EISs. Conclusion. 7. Understanding Entity Beans. Client View of an Entity Bean. Home Interface. Component Interface. Primary Key and Object Identity. Entity Object Life Cycle. Entity Bean Handle. Bean Developer View of an Entity Bean. Container-Managed Persistence. EJB QL Query Language. Bean-Managed Persistence. Entity Bean Class Methods. Entity Bean Instance Life Cycle. Using the ejbLoad and ejbStore Methods. Designing the Entity Bean Component Interface. Concurrent Invocation of an Entity Object. Using Entity Beans with Preexisting Data. Conclusion. 8. Entity Bean Application Example. Application Overview. Problem Description. Main Parts of the Application. Distributed Deployment. Parts Developed by Wombat. Overview of the Wombat Parts. EnrollmentEJB Session Bean. EmployeeEJB Entity Bean. SelectionEJB Entity Bean. PlanEJB Entity Bean. DoctorEJB Entity Bean. EnrollmentWeb Web Application. BenefitsAdminWeb Web Application. BenefitsDatabase. Packaging of Parts. Parts developed at Star Enterprise. EmployeeDatabase and Deployment of EmployeeEJB. EmployeeBeanBMP Entity Bean Class. Payroll System. Conclusion. 9. Using Enterprise JavaBeans in Web Services. Introduction to Web Services. Web Services Technologies. J2EE and Web Services. Developing a Web Service Using Stateless Session Beans. Developing a New Web Service. Exposing A Stateless Session Bean as a Web Service. Stateless Session Bean Web Service Example. InsurancePlanAdminEJB Stateless Session Bean. Developing and Packaging the Web Service. Accessing a Web Service from an Enterprise Bean. Accessing a Web Service Example. Providence Web Service. ProvidencePlanEJB Entity Bean. ProvidenceDoctorEJB Entity Bean. Packaging. Document-Oriented Web Services. Conclusion. 10. Understanding Transactions. Declarative Transaction Demarcation. Transaction Attributes. Transaction Attribute Values. Transaction Attributes for Message Driven Beans. Transaction Attributes for Sample Application. Programmatic Transaction Demarcation. Transaction Demarcated by a Client. Transaction Demarcation by a Session Bean. Pitfalls of Using Programmatic Transaction Demarcation. Conclusion. 11. Managing Security. Responsibilities of the System Administrator. Administering Users and Security Principals. Managing Principal Mapping. Responsibilities of the Container Provider. Authentication and Authorization Tasks. Managing Multiple Applications and Domains. Application Provider's View of Security. Client Authentication. Authorization. Declarative Security Mechanism. Security Roles. Method Permissions. Using Run-As Principal. Programmatic Security API. Example Security Application. Deployer's Responsibility. Deploying Wombat's Enterprise Beans. Deploying Star Enterprise's Beans. Conclusion. Appendix A API Reference. EJBObject Interface Methods. EJBLocalObject Interface Methods. EJBHome Interface Methods. EJBLocalHome Interface. EnterpriseBean Interface. EJBContext Interface Methods. EJBMetaData Interface Methods. EntityBean Interface Methods. EntityContext Interface Methods. Handle Interface Methods. HomeHandle Interface Methods. SessionBean Interface Methods. SessionContext Interface Methods. SessionSynchronization Interface Methods. Exception Classes. CreateException Class. DuplicateKeyException Class. EJBException Class. FinderException Class. NoSuchEntityException Class. ObjectNotFoundException Class. RemoveException Class. Appendix B Code Samples. Session Bean Helper Classes. EnrollmentBean Source Code. PayrollEJB Session Bean Class. Entity Application EnrollmentBean Implementation. SelectionBean Implementation. PlanBean Implementation Class. EmployeeBeanBMP Class. PayrollBean Implementation Class Using Connectors. CCI Interface Classes. InsurancePlanAdminBean. ProvidencePlanBean. ProvidenceDoctorBean class. Command Beans. Glossary. Index. 0201914662T05052003