O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EJB 2.0 Development with WebSphere Studio Application Developer

Book Description

This IBM Redbook provides detailed information on how to effectively use WebSphere Studio Application Developer for the development of applications based on the Enterprise JavaBeans (EJB) architecture, and deployment of such applications to a WebSphere Application Server.

Throughout the book, we provide examples based on a simple banking application with an underlying relational database.

In Part 1, we introduce EJBs as a part of Java 2 Enterprise Edition (J2EE) and cover the basic concepts and the architecture. In particular we point out the new functions introduced with the EJB 2.0 specification that provide, for example, enhanced functionality for container-managed persistence entity beans and message-driven beans. We also provide best practice guidelines for successful implementations of EJBs.

In Part 2, we introduce the sample banking application and then implement entity beans, session beans, and message-driven beans using WebSphere Studio Application Developer. We also implement finder methods, different mapping strategies, and simple clients that use the EJBs. At the end, we describe how to deploy EJB applications to a WebSphere Application Server.

Table of Contents

  1. Copyright
  2. Preface
  3. EJB architecture and concepts
    1. Introduction to Enterprise JavaBeans
      1. Server-side component architecture
      2. Why EJBs?
      3. Java 2 Platform, Enterprise Edition (J2EE)
      4. EJB specifications
      5. EJB 2.0 overview
      6. A brief look at history
      7. Adopting EJB technology
      8. End-to-end enterprise application development
      9. Summary
    2. EJB architecture and concepts
      1. Introduction
      2. EJB roles
      3. Main EJB framework components
      4. Remote and local interfaces: comparison
      5. Bean-container contract revisited
      6. EJB framework summary
      7. Enterprise bean types: revisited
      8. EJB development and deployment process
      9. Developing an EJB: an example application
      10. Summary
    3. Entity beans
      1. Introduction
      2. Entity bean concepts
      3. Bean-container contract
      4. Life cycle of an entity bean
      5. Abstract persistence schema mappings
      6. Developing an entity bean: Customer
      7. Entity bean design and construction best practices
      8. Client view of an entity bean
      9. Summary
    4. Entity beans advanced: relationships, inheritance, custom queries
      1. Introduction
      2. EJB container-managed relationships (CMR)
      3. EJB inheritance
      4. EJB custom query methods
      5. EJB query language (EJB QL)
      6. Developing entity beans with advanced concepts
      7. Entity bean design and construction best practices
      8. Client view of advanced entity bean concepts
      9. Summary
    5. Session beans
      1. Introduction
      2. Session bean concepts
      3. Bean-container contract
      4. Life-cycle sequence of session beans
      5. Developing a session bean
      6. Session bean design and construction best practices
      7. Client view of a session bean
      8. Summary
    6. Message-driven beans
      1. Introduction
      2. Java messaging service concepts
      3. Message-driven bean concepts
      4. Developing a message-driven bean
      5. MDB client programming
      6. Message-driven bean interaction patterns
      7. Message-driven bean best practices
      8. Summary
    7. EJB clients
      1. Client types
      2. How to access EJBs
      3. Using access beans
      4. Using a session facade to entity beans
      5. Client comparison
      6. Home factory pattern
      7. Summary
    8. Additional concepts: transactions, exceptions, security
      1. Introduction
      2. Transactions
      3. EJB exception handling
      4. Security
      5. Summary
  4. Developing and testing EJBs with Application Developer
    1. WebSphere Studio Application Developer
      1. WebSphere Studio Application Developer
      2. WebSphere Studio Workbench
      3. Workbench window
      4. Perspectives and views
      5. Projects
      6. Servers
      7. EJB development environment
    2. Introducing and preparing for the sample application
      1. Bank model
      2. Bank database
      3. Preparing Application Developer
      4. Summary
    3. Container-managed entity bean development
      1. Developing the account CMP entity bean
      2. Testing the enterprise bean
      3. Developing the customer and transaction record EJBs
      4. Developing relationships
      5. Developing inheritance structures
      6. Cleaning the model
      7. Developing custom finders
      8. Developing a home method
      9. Code generation for finder and select methods
    4. Mapping strategies for CMPs
      1. Mapping strategies
      2. Mapping examples
      3. Converters and composers
    5. Bean-managed entity bean development
      1. Bean-managed persistence (BMP)
      2. Why BMP?
      3. Recommendations
      4. Developing a BMP entity bean
      5. Generating the deployed code
      6. Creating the database table
      7. Testing the BMP entity bean
      8. Read-only methods
      9. Summary
    6. Session bean development
      1. Design
      2. Developing a stateless session bean
      3. Developing a stateful session bean
      4. Creating a Web Service from a session bean
      5. Summary
    7. EJB access beans
      1. What are access beans?
      2. Developing access beans
      3. Summary
    8. Message-driven bean development
      1. Design
      2. Developing a message-driven bean
      3. Setting up the server
      4. Message-driven bean clients
      5. Testing the MDB
      6. Transaction types
      7. Summary
    9. Client development
      1. Type of clients
      2. References
      3. Developing a servlet client
      4. Developing a Struts-based Web client
      5. J2EE client container
      6. Developing a message-driven bean client
      7. GUI client using access beans
      8. Client using a Web service
      9. Externalizing strings
      10. Summary
    10. Deployment of enterprise applications
      1. Enterprise application
      2. Configuring the WebSphere Application Server
      3. Installing an enterprise application
      4. Testing the ITSO banking application
      5. Application Assembly Tool
      6. Command-line tools
      7. Summary
    11. Application Developer team development environment
      1. Introduction
      2. Setting up a team repository
      3. Concurrent Versions System
      4. Development scenario for a single user
      5. Development scenario for a team
  5. Appendixes
    1. Setting up the environment
      1. Installation planning
      2. Installing DB2 UDB
      3. Installing IBM WebSphere Application Server
      4. Installation of WebSphere Studio Application Developer
      5. Setting up the EJBBANK database
    2. Additional material
      1. Locating the Web material
      2. Using the Web material
    3. Abbreviations and acronyms
    4. Related publications
      1. IBM Redbooks
      2. Referenced Web sites
      3. How to get IBM Redbooks
  6. Back cover
  7. Index