Special Edition Using Enterprise JavaBeans™ 2.0

Book description

Special Edition Using EJB 2.0 starts with a description of how EJB fits into the big picture of J2EE development, then covers such topics as:

  • Locating EJB's using JNDI

  • Managing data with EJB Query Language

  • Building JMS applications using the new Message-driven Bean

  • Planning EJB applications using design patterns

  • Later chapters describe advanced development topics including interoperability, horizontal services and clustering. Throughout the book, the authors construct a component-based auction web site using the J2EE architecture as a practical example.

    Table of contents

    1. Copyright
    2. About the Authors
    3. Acknowledgments
    4. Tell Us What You Think!
    5. Introduction
    6. Developing Enterprise JavaBeans
      1. Introduction to Enterprise Applications
        1. The Enterprise JavaBeans Architecture
        2. Component-Based Distributed Computing
        3. N-Tiered Architectures
        4. Why Use EJB?
      2. Setting the Stage–An Example Auction Site
        1. The Auction Example
        2. Overview of an English Auction
        3. Choosing the Use Cases to Implement
        4. Defining the Object Model
        5. What’s Next?
      3. EJB Concepts
        1. Grasping the Concepts Early
        2. What Is an Enterprise Bean?
        3. EJB Roles and Their Responsibilities
        4. Local Versus Remote EJB Clients
        5. Using RMI to Communicate with Enterprise JavaBeans
        6. Accessing an EJB Through Its Component Interface
        7. Locating Enterprise Beans Using the Home Interface
        8. Deciding Whether to Use a Local or Remote Client
        9. Creation and Removal of EJBs
        10. Passivation and Activation
        11. Object Pooling
        12. Handles
        13. The EJBMetaData Class
        14. EJB Server and Container Implementations
      4. Java Naming and Directory Interface
        1. Why Applications Need Naming and Directory Services
        2. Overview of the JNDI Architecture
        3. Selecting and Configuring a JNDI Provider
        4. The JNDI Environment Properties
        5. Setting the JNDI Environment Properties
        6. The Context and InitialContext Objects
        7. Getting the Environment for a Context Object
        8. Using the lookup Method to Locate JNDI Resources
        9. Locating EJB Objects
        10. Accessing an EJB’s Environment
        11. Establishing Security Through the InitialContext
        12. JNDI and Clustering
        13. Troubleshooting
      5. Entity Beans
        1. What Is an Entity Bean?
        2. Declaring the Component Interface
        3. Defining the Primary Key Class
        4. Declaring the Home Interface
        5. Implementing an Entity Bean
        6. Inheritance and Entity Beans
        7. Are Entity Beans Worth It?
      6. Bean-Managed Persistence
        1. Choosing to Manage Persistence Yourself
        2. JDBC Primer
        3. Configuring a Data Source
        4. Creating an Entity Bean
        5. Loading and Storing an Entity
        6. Accessing Other Entity Beans
        7. Implementing Finder Methods
        8. Deleting an Entity
        9. Deploying an Entity Bean Using BMP
        10. Troubleshooting
      7. Container-Managed Persistence
        1. Building Portable Entity Beans
        2. Declaring a CMP Entity Bean
        3. Implementing the Container Callback Methods
        4. Deploying an Entity Bean Using CMP
        5. Managing Relationships
        6. Using EJB 1.1 CMP
        7. Troubleshooting
      8. EJB Query Language
        1. What Is the EJB Query Language?
        2. Defining a FROM Clause
        3. Defining a WHERE Clause
        4. Defining a SELECT Clause
        5. Using the Built-In Functions
        6. EJB QL Syntax in BNF Notation
        7. Troubleshooting
      9. Session Beans
        1. What Is a Session Bean?
        2. Differences Between Stateless and Stateful Session Beans
        3. Declaring the Component Interface
        4. Declaring the Home Interface
        5. Implementing a Session Bean
        6. Deploying a Session Bean
        7. Reentrant Issues
        8. Troubleshooting
      10. Java Message Service
        1. Introduction to Messaging
        2. Components of the JMS Architecture
        3. The Two JMS Message Models
        4. The JMS Interfaces
        5. The Details of a JMS Message
        6. Message Selection and Filtering
        7. Using the JMS Point-to-Point Model
        8. Using the JMS Publish/Subscribe Model
        9. Synchronous Versus Asynchronous Messaging
        10. Message Persistence
        11. Using Transactions with JMS
        12. Using JMS with Enterprise JavaBeans
        13. Troubleshooting
      11. Message-Driven Beans
        1. What Are Message-Driven Beans?
        2. The Message-Driven Bean and the Container
        3. Using Message-Driven Beans with EJB
        4. Using JMS Queues or Topics with Message-Driven Beans
        5. Creating a Message-Driven Bean
        6. Deploying a Message-Driven Bean
        7. Sending Messages to a Message-Driven Bean
        8. Acknowledging Messages from Message-Driven Beans
        9. Using Transactions with Message-Driven Beans
        10. Troubleshooting
      12. Transactions
        1. Understanding Transactions
        2. Passing the ACID Test
        3. Programming with the Java Transaction API
        4. Using Container-Managed Transactions
        5. Using Bean-Managed Transactions
        6. Using Client-Demarcated Transactions
        7. Isolating Access to Resources
        8. Troubleshooting
      13. Exception Handling
        1. EJB Exception Handling
        2. Application Exceptions
        3. System Exceptions
        4. Exceptions and Transactions
        5. Packaging Exceptions
        6. Troubleshooting
      14. Security Design and Management
        1. The Importance of Application Security
        2. Understanding Your Application’s Security Requirements
        3. Basic Security Concepts
        4. Java Security Fundamentals
        5. Using Security with Enterprise JavaBeans and J2EE
        6. Sketching Out the Auction Security
        7. Java Authentication and Authorization Service (JAAS)
      15. Deployment
        1. Deployment Descriptors and EJB Roles
        2. Bean Provider Responsibilities
        3. Application Assembler Responsibilities
        4. Deployer Responsibilities
        5. Packaging EJBs
        6. Troubleshooting
    7. Design and Performance
      1. Patterns and Strategies in EJB Design
        1. What Are Patterns?
        2. Strategies for Enterprise JavaBeans
        3. Designing EJB Classes and Interfaces
        4. Managing Client Access
        5. Implementing a Singleton in EJB
        6. Troubleshooting
      2. Addressing Performance
        1. The Role of Performance in Design
        2. Minimizing Remote Calls
        3. Optimizing Entity Bean Persistence
        4. Building a Pick List
        5. Managing Transactions
        6. Troubleshooting
      3. Performance and Stress Testing Your Applications
        1. Why Stress Test Your Applications?
        2. Performance Testing Your Beans
        3. Stress Testing Your Beans
        4. Using ECperf 1.0
        5. Troubleshooting
    8. Building the Web Tier
      1. Building a Presentation Tier for EJB
        1. The Different Types of Presentation Tiers
        2. Using a Façade Pattern to Hide EJB
        3. Using Servlets and Java Server Pages with EJB
        4. Using JSP Tag Libraries
        5. Using the Struts Open-Source Framework
        6. Caching on the Web Server or in Stateful Session Beans
    9. Advanced Concepts
      1. Distribution and EJB Interoperability
        1. Interoperability Overview
        2. Portability Versus Interoperability
        3. EJB 2.0 Interoperability Goals
        4. The Relationship Between CORBA and Enterprise JavaBeans
        5. Remote Invocation Interoperability
        6. Transaction Interoperability
        7. Naming Interoperability
        8. Security Interoperability
      2. Horizontal Services
        1. What Are Horizontal Services?
        2. Horizontal Services Provided by EJB
        3. Traditional Buy Versus Build Analysis
        4. Auction Example Horizontal Services
        5. Building the Auction Logging Service
        6. Java 1.4 Logging API
        7. Building an E-Mail Horizontal Service
        8. Troubleshooting
      3. EJB Clustering Concepts
        1. Too Much Isn’t Always a Good Thing
        2. What Is Clustering?
        3. Clustering in the Web Tier
        4. Clustering in the EJB Tier
        5. Single VM Versus Multiple VM Architectures
      4. EJB 2.0 Programming Restrictions
        1. The Purpose of the Restrictions
        2. The EJB 2.0 Restrictions
        3. Summary
    10. Appendixes
      1. The EJB 2.0 API
        1. Interfaces
        2. Exceptions
        3. The javax.ejb.spi Package
      2. Changes from EJB 1.1
        1. Local Clients
        2. Message-Driven Beans
        3. Container-Managed Persistence Changes
        4. EJB Query Language
        5. Home Interface Business Methods
        6. Security Changes
        7. Component Interoperability

    Product information

    • Title: Special Edition Using Enterprise JavaBeans™ 2.0
    • Author(s): Chuck Cavaness, Brian Keeton
    • Release date: September 2001
    • Publisher(s): Que
    • ISBN: 9780789725677