Enterprise Java Programming with IBM WebSphere

Book description

Enterprise Java Programming with IBM WebSphere, Second Editionby Kyle Brown, Gary Craig, Greg Hester, Russell Stinehour, W. David Pitt, Mark Weitzel, JimAmsden, Peter M. Jakab, Daniel BergForeword by Martin Fowler

Enterprise Java Programming with IBM WebSphere, Second Edition is the definitive guide tobuilding mission-critical enterprise systems with J2EE, WebSphere, and WebSphere StudioApplication Developer. Fully updated for Versions 5.x of WebSphere Application Server andWebSphere Studio Application Developer, it combines expert architectural best practices with acase study that walks you through constructing an entire system.

The authors are an extraordinary team of WebSphere insiders: developers, consultants,instructors, and IBM WebSphere development team members. Together, they offer unprecedentedinsight into the use and behavior of WebSphere's APIs in real-world environments—andsystematic guidance for delivering systems of exceptional performance, robustness, and businessvalue.

Coverage includes—

  • Practical introductions to J2EE, WebSphere Application Server 5.0, and Web application architecture

  • Detailed coverage of Web application construction, including MVC partitioning with Struts, servlets/JSP, and session management

  • Step-by-step guidance for building and testing application business models, including JUnit testing

  • In-depth insight into EJB architecture, including transactions, security, and advanced object relational mapping

  • Web services: examples and best practices leveraging WebSphere Application Server 5.x's latest enhancements

  • CD-ROMs Included

    The CD-ROMs contain trial copies of IBM WebSphere Studio Application Developer (Version 5.0.2),IBM WebSphere Application Server (Version 5.02), and DB2 Universal Database, Personal Edition(Version 8.1.2) for Microsoft Windows 2000/XP. The CD-ROMs also include source code for thecase study examples used in the book.

    Table of contents

    1. Copyright
      1. Dedications
    2. IBM Press Series—Information Management
      1. On Demand Computing Books
      2. DB2 Books
      3. More Books from IBM Press
    3. Foreword
    4. Preface
      1. Here We Go Again
      2. About Us
      3. The Goals We Have Set
      4. Acknowledgements and Thanks
    5. 1. Introduction
      1. 1.1. Why Software Development Must Consider the Whole Enterprise
      2. 1.2. How Iterative Development Addresses Key IT Management Issues
      3. 1.3. Today's Enterprise Applications Have New Requirements
      4. 1.4. What Is the Starting Point?
      5. 1.5. What Is a Layered Architecture?
        1. 1.5.1. Common layering schemes
        2. 1.5.2. Layered Architecture Definition
          1. 1.5.2.1. Presentation
          2. 1.5.2.2. Controllers and Mediators
          3. 1.5.2.3. Domain
          4. 1.5.2.4. Mapping
        3. 1.5.3. Data Source Access
        4. 1.5.4. Application Services
        5. 1.5.5. The Virtues of Test Scripts
      6. 1.6. Layered Architecture Benefits
      7. 1.7. Summary
    6. 2. Introduction to the Case Study
      1. 2.1. Case Study Analysis and Design Artifacts
        1. 2.1.1. Problem Statement
        2. 2.1.2. System Tasks
        3. 2.1.3. Use Case List
        4. 2.1.4. Use Case Diagrams
      2. 2.2. Use Case Definitions
      3. 2.3. Designing the Case Study Domain Model
      4. 2.4. Using the Case Study in Our Book
      5. 2.5. Summary
    7. 3. J2EE Overview
      1. 3.0.1. J2EE Component Design
      2. 3.0.2. Configurable Implementations
      3. 3.0.3. Configurable Algorithms
      4. 3.0.4. Who Defines These Specifications?
      5. 3.1. Why J2EE?
      6. 3.2. J2EE Architecture
        1. 3.2.1. JDBC
        2. 3.2.2. Servlet/JSP
        3. 3.2.3. EJB
        4. 3.2.4. Connector
        5. 3.2.5. JMS
        6. 3.2.6. Java Mail
        7. 3.2.7. JTA
        8. 3.2.8. JAX-RPC
        9. 3.2.9. SAAJ
        10. 3.2.10. JMX
      7. 3.3. J2EE Platform Roles
        1. 3.3.1. J2EE Product Provider
        2. 3.3.2. Application Component Provider
        3. 3.3.3. Application Assembler
        4. 3.3.4. Deployer
        5. 3.3.5. System Administrator
        6. 3.3.6. Tool Provider
      8. 3.4. J2EE Versions and Evolution
      9. 3.5. A J2EE Perspective
      10. 3.6. Summary
    8. 4. What Is WebSphere?
      1. 4.1. WebSphere Foundation and Tools
        1. 4.1.1. WebSphere Studio
        2. 4.1.2. WebSphere Application Server Family
        3. 4.1.3. WebSphere Application Server (WAS)
        4. 4.1.4. WAS Network Deployment (ND)
        5. 4.1.5. WAS Enterprise Edition (WAS EE)
      2. 4.2. The WAS Core Architecture
      3. 4.3. Administering a local WAS Server
      4. 4.4. Leveraging the Scalability of WAS ND
      5. 4.5. Summary
    9. 5. Presentation Layer Patterns
      1. 5.1. Java User Interface Technologies
        1. 5.1.1. Servlet/JSP
        2. 5.1.2. XML/XSLT
        3. 5.1.3. Swing-Based GUI
      2. 5.2. Decoupling the User Interface
        1. 5.2.1. MVC Pattern
        2. 5.2.2. Single Servlet vs. Multiple Servlet
        3. 5.2.3. The Struts Framework
        4. 5.2.4. Logical View Logic
      3. 5.3. Mediating Logical View Logic
        1. 5.3.1. List Support
        2. 5.3.2. Selected Object
        3. 5.3.3. Communicating Validation Messages
        4. 5.3.4. View Transition Support
        5. 5.3.5. Collapsing Object Graphs
      4. 5.4. Summary
    10. 6. Servlets
      1. 6.1. HTTP Technology Primer
        1. 6.1.1. Uniform Resource Identifiers
          1. 6.1.1.1. HTTP URL
          2. 6.1.1.2. What is the difference between a URI and URL?
        2. 6.1.2. Requests, Responses, and Headers
          1. 6.1.2.1. Headers
          2. 6.1.2.2. Requests
          3. 6.1.2.3. Responses
        3. 6.1.3. Pulling It All Together
      2. 6.2. Servlet Concepts
        1. 6.2.1. Support for Servlets
          1. 6.2.1.1. Servlet Engines
            1. Stand-alone Servlet Engines
            2. Add-on Servlet Engines
            3. Embeddable Servlet Engines
      3. 6.3. Servlet Life Cycle
      4. 6.4. An Example Servlet
      5. 6.5. Web Deployment Descriptors
      6. 6.6. Filters
      7. 6.7. Servlet API Classes and Interfaces
        1. 6.7.1. javax.servlet package
        2. 6.7.2. javax.servlet.http package
      8. 6.8. Summary
    11. 7. Developing Servlets Using IBM WebSphere Studio Application Developer
      1. 7.1. The IBM WebSphere Studio Family of Tools
        1. 7.1.1. WebSphere Studio Workbench Overview
      2. 7.2. Building an Example Servlet with WSAD
        1. 7.2.1. Create a Web project
        2. 7.2.2. Building a business model with Java objects
        3. 7.2.3. Persist the Model using JDBC and the Active Record Pattern
        4. 7.2.4. Create and Edit HTML for the List-Detail User Interface
        5. 7.2.5. Create the servlets for accessing and updating the model
      3. 7.3. Some Problems with This Example
      4. 7.4. Summary
    12. 8. Testing Servlets Using WSAD
      1. 8.1. Edit the Web Deployment Descriptor
        1. 8.1.1. Deploying to an Enterprise Application
        2. 8.1.2. Configure the Enterprise Application to Deploy the Web Application
          1. 8.1.2.1. Configure the WSAD Test Environment and publish the application
        3. 8.1.3. Start the WTE
        4. 8.1.4. Edit HMTL and Servlet Code and Retest
        5. 8.1.5. Debug a Servlet
      2. 8.2. Summary
    13. 9. Managing Session State
      1. 9.1. Some Client-Side Session Approaches
        1. 9.1.1. Using Cookies to Maintain State
        2. 9.1.2. Hidden Fields
        3. 9.1.3. URL Parameters
      2. 9.2. Servlets and Session State
        1. 9.2.1. HttpSession Binding
        2. 9.2.2. How the Session Is Found
      3. 9.3. Choosing the Right Approach
        1. 9.3.1. URL Rewriting
      4. 9.4. Session Persistence
        1. 9.4.1. WebSphere Persistent Session Management
          1. 9.4.1.1. Database session persistence
            1. Single vs multirow schema
          2. 9.4.1.2. Memory-to-memory session replication
        2. 9.4.2. Comparing Database Persistence to M2M Replication
        3. 9.4.3. Controlling When Session Data Is Persisted
        4. 9.4.4. Session Management Levels
      5. 9.5. Summary
    14. 10. JavaServer Pages Concepts
      1. 10.1. Page Templates and Server-Side Scripting
      2. 10.2. A Short History of Java Server Pages
      3. 10.3. Page Compilation—Runtime View
      4. 10.4. JSP Syntax
      5. 10.5. Scripting Elements
        1. 10.5.1. Scriptlets
        2. 10.5.2. Expressions
        3. 10.5.3. Declarations
      6. 10.6. Directives
        1. 10.6.1. The Page Directive
        2. 10.6.2. The Include Directive
        3. 10.6.3. Implicit Objects
      7. 10.7. JSP Documents
        1. 10.7.1. Examining an XML Style Syntax JSP Document
        2. 10.7.2. XML Syntax Elements
        3. 10.7.3. Creating an XML Syntax JSP in WebSphere Studio
      8. 10.8. Roles for JSP
      9. 10.9. Summary
    15. 11. Tag Libraries and Custom Tags
      1. 11.1. Introduction
      2. 11.2. Basic Model for Custom Tags
      3. 11.3. JSTL and Other Widely Used Tag Libraries
      4. 11.4. Writing Tag Handlers
      5. 11.5. Tag Library Descriptor (.tld)
      6. 11.6. Taglib Directive and Coding Custom Actions
      7. 11.7. Support for Custom Actions
      8. 11.8. Summary
    16. 12. Design Considerations for Controllers
      1. 12.1. Where Do Controllers Come From?
      2. 12.2. Controller Design Alternatives
        1. 12.2.1. Page Controller
        2. 12.2.2. Gateway servlet
      3. 12.3. Exception Handling
      4. 12.4. Logging
      5. 12.5. Servlet Filters
      6. 12.6. Summary
    17. 13. Developing and Testing JSPs in WSAD
      1. 13.1. Another Look at MVC
      2. 13.2. JavaBeans, Introspection, and Contracts
      3. 13.3. Building Applications Using JSPs with WSAD
      4. 13.4. Editing JavaServer Pages
      5. 13.5. Validating the JSP Page
      6. 13.6. Running on the Server
      7. 13.7. Debugging the JSP
      8. 13.8. Simplifying JSPs
        1. 13.8.1. Java Standard Tag Library
        2. 13.8.2. JSTL Expression Language
        3. 13.8.3. Mixing JSTL RT with JSP Expressions
      9. 13.9. XML compliance
      10. 13.10. Summary
    18. 14. Apache Struts as an MVC Framework
      1. 14.1. Road Map
      2. 14.2. Why Do You Need a Framework?
      3. 14.3. What Is Struts?
      4. 14.4. A Simple MVC Struts Example
        1. 14.4.1. Building the Model (Form Beans)
        2. 14.4.2. Building the Actions
        3. 14.4.3. ActionForm Validation
        4. 14.4.4. Putting it all Together in the struts-config.xml file
        5. 14.4.5. HTML Form Tags
        6. 14.4.6. Local Forwards
      5. 14.5. Struts Best Practices
      6. 14.6. Summary
    19. 15. XML/XSL Web Interfaces in WSAD
      1. 15.1. Strategy for Using XML/XSL for Web Interfaces
        1. 15.1.1. Interaction Controller
        2. 15.1.2. XML Generator
        3. 15.1.3. XSL
        4. 15.1.4. Pulling It All Together
      2. 15.2. Example XML/XSL Web Interface with WSAD
        1. 15.2.1. Creating a Web Project
        2. 15.2.2. Creating the XML file
      3. 15.3. Creating the XSL File
        1. 15.3.1. XSL Debugging and Transformation
          1. 15.3.1.1. Transforming XML files
          2. 15.3.1.2. Debugging XSL and XML files
          3. 15.3.1.3. Options for Debugging and Transforming XSL files
      4. 15.4. Enhanced Example of XML/XSL Web Interface with WSAD
        1. 15.4.1. Review timesheet1.xsl
        2. 15.4.2. Refactor 1: Decompose into Templates
        3. 15.4.3. Refactoring 2: Add Time Sheet Entry Detailed Information
          1. 15.4.3.1. Entries Template
          2. 15.4.3.2. Entry Template
          3. 15.4.3.3. Integrating with Existing Templates
          4. 15.4.3.4. Testing the New Templates
        4. 15.4.4. Refactoring 3: Add Project Summary Information
          1. 15.4.4.1. ProjectTotals template
          2. 15.4.4.2. Project Template
          3. 15.4.4.3. Integrating with Existing Templates
          4. 15.4.4.4. Testing the New Templates
      5. 15.5. Dynamic Example XML/XSL Web Interface with WSAD
        1. 15.5.1. Create a Java Package
        2. 15.5.2. Create an XML Generator
        3. 15.5.3. Update Java Classpath
        4. 15.5.4. Create a URIResolver Implementation
        5. 15.5.5. Create a Servlet
        6. 15.5.6. Test and Debug
      6. 15.6. When to Use XML/XSL for Web Interfaces
      7. 15.7. Summary
    20. 16. Developing and Testing the Domain Model
      1. 16.1. The Domain Model Layer
        1. 16.1.1. Service Layer
        2. 16.1.2. Approaches to Domain Modeling
        3. 16.1.3. The Mini-Max Approach to Domain Modeling
        4. 16.1.4. Issues with Domain Modeling
      2. 16.2. The Data Mapping Layer
        1. 16.2.1. Object-to-Relational Mapping
          1. 16.2.1.1. Mapping Architecture Overview
          2. 16.2.1.2. Accessing Object-Specific Mappers
          3. 16.2.1.3. Mapping Objects to Relational Tables
          4. 16.2.1.4. Handling Object Identity
          5. 16.2.1.5. Mapping Object Attributes
          6. 16.2.1.6. Finding Objects
          7. 16.2.1.7. Maintaining Consistent State
          8. 16.2.1.8. Mapping Associations
          9. 16.2.1.9. Inheritance
          10. 16.2.1.10. Lazy Load
          11. 16.2.1.11. Keeping Track of Changes
          12. 16.2.1.12. Transaction Management
          13. 16.2.1.13. Odds and Ends
      3. 16.3. Testing the Model
      4. 16.4. Summary
    21. 17. Unit and Functional Testing Applications in WSAD
      1. 17.1. Overall Testing Approaches
        1. 17.1.1. Tool Selection
        2. 17.1.2. Coding Standards
        3. 17.1.3. Testing Strategies
        4. 17.1.4. Why Unit Test?
      2. 17.2. What Is JUnit?
      3. 17.3. A Simple Example
      4. 17.4. Unit Testing Containers with Cactus
        1. 17.4.1. Cactus API
      5. 17.5. Function Testing Applications in WSAD
      6. 17.6. Function Testing
      7. 17.7. What Is HttpUnit?
      8. 17.8. The HttpUnit API
      9. 17.9. Following Links
      10. 17.10. Working with Forms
      11. 17.11. Working with Tables
      12. 17.12. Working with Frames
      13. 17.13. Working with a Document Object Model (DOM)
      14. 17.14. 17.14 Functional Test Design Considerations
      15. 17.15. Summary
    22. 18. Supporting Enterprise Applications
      1. 18.1. Another Look at the n-Tier Architecture
      2. 18.2. Why Aren't HTML, Servlets, and JSPs Enough?
      3. 18.3. Object Distribution
        1. 18.3.1. A Quick Overview of CORBA
        2. 18.3.2. A Brief Overview and History of RMI
        3. 18.3.3. Some of the Remaining Holes
        4. 18.3.4. Where This Leads Us
      4. 18.4. Integration Styles and Messaging
        1. 18.4.1. JMS and MOMs
      5. 18.5. Object Persistence
      6. 18.6. Objects and Transactions
      7. 18.7. Security in Enterprise Applications
      8. 18.8. Summary
    23. 19. Basic EJB Architecture
      1. 19.1. Core EJB Concepts
        1. 19.1.1. Components and Containers
        2. 19.1.2. Deployment
      2. 19.2. The EJB Types
        1. 19.2.1. Session EJBs
        2. 19.2.2. Entity EJBs
        3. 19.2.3. Message-Driven Beans
      3. 19.3. Introducing the EJB Programming Model
      4. 19.4. EJBs—Distributed or Not?
        1. 19.4.1. The Local EJB Idea
        2. 19.4.2. Differences Between Local and Remote EJBs
      5. 19.5. Basic Architectural Patterns for EJBs
      6. 19.6. The Role of Persistence
        1. 19.6.1. Mapper Layers
        2. 19.6.2. Container Managed Entity Beans
        3. 19.6.3. Other Options
      7. 19.7. When Do You Need EJBs?
        1. 19.7.1. Some Technical Questions to Ask
      8. 19.8. Summary
    24. 20. Developing EJBs with WSAD
      1. 20.1. The J2EE Perspective
        1. 20.1.1. J2EE Hierarchy View
        2. 20.1.2. J2EE Navigator View
        3. 20.1.3. Servers View
        4. 20.1.4. DB Servers View
      2. 20.2. J2EE Projects
        1. 20.2.1. Java Utility JARs
        2. 20.2.2. J2EE Project Dependencies
        3. 20.2.3. JAR Dependency Editor
      3. 20.3. Creating a Session Bean
        1. 20.3.1. Using the EJB Creation Wizard
      4. 20.4. Testing the New Session Bean
        1. 20.4.1. Testing the Session Bean with the Universal Test Client
      5. 20.5. Summary
    25. 21. Testing and Debugging EJBs in WSAD
      1. 21.1. Developing the Service Layer
        1. 21.1.1. Creating and Configuring the Example Projects
        2. 21.1.2. Creating the Session Bean
        3. 21.1.3. Add the Service Layer Methods
        4. 21.1.4. Promoting the Service Layer Methods to the Local and Remote Interfaces
        5. 21.1.5. Developing the Client View
      2. 21.2. Overview of the Testing Process
        1. 21.2.1. Step 1: Generate the EJB Deployment Classes for an EJB Project
        2. 21.2.2. Step 2: Create and Configure a Server Instance and Add the EAR Project
        3. 21.2.3. Step 3: Publishing and Starting the Server Instance
        4. 21.2.4. Step 4: Test Your EJB with the Universal Test Client and Client Web Module
        5. 21.2.5. Step 5: Debugging EJBs Using the WSAD Debugger
        6. 21.2.6. Step 6: Publish the enterprise application to an External WebSphere Server
          1. 21.2.6.1. Create a Server Instance and Configuration
          2. 21.2.6.2. Add the Enterprise Application to the Server
          3. 21.2.6.3. Configure the server
          4. 21.2.6.4. Publish the Server
          5. 21.2.6.5. Start Up the Server
          6. 21.2.6.6. Run the Application
        7. 21.2.7. Step 7: Debug the Published Application Using the Distributed Debugger
      3. 21.3. Summary
    26. 22. EJB Client Development
      1. 22.1. Using Servlets as EJB Clients
      2. 22.2. Building Java Application Clients
      3. 22.3. Applet Clients in WebSphere
      4. 22.4. Naming and the WebSphere Namespace
        1. 22.4.1. Names and Name Resolution
      5. 22.5. Creating a Test Client
      6. 22.6. Deploying Application Clients in WebSphere
      7. 22.7. Deploying and Running the EJB Client to the WebSphere Client Container
      8. 22.8. Some Design Points about EJB Clients
      9. 22.9. Summary
    27. 23. Simple CMP Entity Beans
      1. 23.1. Entity Bean Basics
      2. 23.2. CMP in WebSphere and WebSphere Studio
      3. 23.3. Creating a CMP EJB Using WebSphere Studio
        1. 23.3.1. What's Left to Do
          1. Step 1
          2. Step 2
          3. Step 3
          4. Step 4
          5. Step 5
          6. Step 6
          7. Step 7
          8. Step 8
          9. Step 9
          10. Step 10
      4. 23.4. The Parts of an Entity Bean
        1. 23.4.1. Local Interfaces
        2. 23.4.2. Local Home Interfaces
        3. 23.4.3. Key Classes
        4. 23.4.4. Uniqueness of Primary Keys
        5. 23.4.5. Bean Implementation Classes
      5. 23.5. Deployment Descriptor
        1. 23.5.1. Container Managed Persistence Fields
        2. 23.5.2. Container Managed Relationships (CMR)
        3. 23.5.3. EJB Query Language (EJB QL)
      6. 23.6. Summary
    28. 24. CMP Mapping Strategies and Mapping in WSAD
      1. 24.1. Databases, CMPs, and Maps
        1. 24.1.1. Top-Down Mapping Example
        2. 24.1.2. Bottom-Up Mapping Example
        3. 24.1.3. Meet-in-the-Middle Mapping Example
          1. 24.1.3.1. Existing Back-end Folder Options
        4. 24.1.4. EJB Mapping Editor
        5. 24.1.5. Re-executing Mapping Commands
        6. 24.1.6. Re-execute Mapping Commands Alternative
        7. 24.1.7. Defining and Using Converters
        8. 24.1.8. Defining and Using Composers
      2. 24.2. Multiple Mapping Back-end Support
      3. 24.3. Exporting Database Tables
      4. 24.4. EJB Query Language
      5. 24.5. Summary
    29. 25. Advanced CMP Mapping
      1. 25.1. Simple Mapping Rules
      2. 25.2. Object-Relational Basics
      3. 25.3. Concepts in EJB 2.0 Relationships
      4. 25.4. Associations in UML
      5. 25.5. Relationships in WSAD V5.0
      6. 25.6. Creating a Single-Valued Relationship
      7. 25.7. Creating a Multivalued Relationship
      8. 25.8. Read Ahead Hints
      9. 25.9. Mapping Relationships
      10. 25.10. Weak vs. Strong Entities
      11. 25.11. EJB Inheritance in WSAD
        1. 25.11.1. Interface Inheritance for Sessions and Entities
        2. 25.11.2. Building Inherited Beans in WSAD
        3. 25.11.3. Inheritance of Home Interfaces
        4. 25.11.4. Database Inheritance Strategies
        5. 25.11.5. Mapping an EJB Inheritance Structure
        6. 25.11.6. Wrapping Up EJB Inheritance
      12. 25.12. Advanced EJB QL
        1. 25.12.1. The FROM Clause
        2. 25.12.2. The SELECT Clause
        3. 25.12.3. The WHERE Clause
        4. 25.12.4. Examples
          1. 25.12.4.1. Find Query Examples
          2. 25.12.4.2. Select Query Examples
      13. 25.13. Summary
    30. 26. Bean-Managed Persistence
      1. 26.1. Applying BMP
      2. 26.2. A Simple BMP Bean
      3. 26.3. Examining BMP Persistence
        1. 26.3.1. Writing ejbCreate() Method in BMP beans
        2. 26.3.2. Writing BMP Finder Methods
        3. 26.3.3. Writing the BMP ejbLoad() Method
        4. 26.3.4. Writing the ejbStore() method for BMP Beans
      4. 26.4. BMP vs. CMP
      5. 26.5. Summary
    31. 27. Introduction to Message-Driven Beans
      1. 27.1. Java Messaging Service
        1. 27.1.1. JMS Is Asynchronous
        2. 27.1.2. JMS Messaging Models
          1. 27.1.2.1. Publish-and-Subscribe
          2. 27.1.2.2. Point-to-Point
      2. 27.2. JMS API Basics
      3. 27.3. Message-Driven Beans
        1. 27.3.1. Example MDB in WSAD
          1. 27.3.1.1. Create the Enterprise Project
          2. 27.3.1.2. Create the MDB
          3. 27.3.1.3. Create a Test Servlet
          4. 27.3.1.4. Configure the JNDI names
          5. 27.3.1.5. Set Up the Server
          6. 27.3.1.6. Test and Debug
      4. 27.4. Summary
    32. 28. Transactions in WebSphere 5.0
      1. 28.1. JDBC Transactions
      2. 28.2. Transactions and 2-Phase Commit
      3. 28.3. JTA and Transaction Demarcation
      4. 28.4. Enabling 2-PC in WebSphere 5.0
      5. 28.5. EJBs and Container-Managed Transactions
      6. 28.6. Participating in a Transaction
      7. 28.7. Using XA Resources with 2-PC in WebSphere
      8. 28.8. Transaction Settings for J2EE 1.3 in WAS 5.0
      9. 28.9. Advice on Using Transactions
        1. 28.9.1. Activity Sessions in WAS EE
      10. 28.10. Extended Transaction Settings in WebSphere 5.0
      11. 28.11. Special Transaction Considerations for JMS
      12. 28.12. Dealing with Concurrency
        1. 28.12.1. Concurrency and EJBs
        2. 28.12.2. Choosing the Right Access Intent
        3. 28.12.3. Application Profiles in WAS 5.0 EE
      13. 28.13. Summary
    33. 29. J2EE Security in WebSphere
      1. 29.1. J2EE Security Overview
        1. 29.1.1. J2EE Security Architecture
        2. 29.1.2. J2EE Authentication in the Web Container
        3. 29.1.3. EJB Client Mechanisms (JAAS)
      2. 29.2. J2EE Authorization
        1. 29.2.1. Specifying Authorization in the Web Container
        2. 29.2.2. Specifying Authorization in the EJB Container
      3. 29.3. Securing Resources with WebSphere Studio
        1. 29.3.1. Defining an Authentication Mechanism in WSAD
          1. 29.3.1.1. Securing Web Resources in WSAD
          2. 29.3.1.2. Securing EJB Resources in WSAD
          3. 29.3.1.3. Reconciling Roles in the Enterprise Application Deployment Descriptor
          4. 29.3.1.4. Creating a Secured Server and Running the Example
      4. 29.4. EJB Security Recommendations
      5. 29.5. Handling Instance-Based Security
        1. 29.5.1. A Session Wrapper Approach for Instance-Based Security
      6. 29.6. GUI-Based Security
      7. 29.7. Summary
    34. 30. Building Layered Architectures for EJB Systems
      1. 30.1. Problems with an All-Entity EJB Solution
      2. 30.2. The Session Façade and DTO Solution
      3. 30.3. Design Points for Session Façades
        1. 30.3.1. Key Points of the Façade Pattern
      4. 30.4. Rules for Session Façades
      5. 30.5. Reasons for EJB Objects
      6. 30.6. A Simple Example from the Case Study
      7. 30.7. A More Complex Example
      8. 30.8. Mappers Revisited
      9. 30.9. Simulated Mappers
      10. 30.10. An Updating Example
      11. 30.11. Testing the Session Façade Example with JUnit
      12. 30.12. Running the Test Client
      13. 30.13. Rules for Creating Session Façades
      14. 30.14. Should Session Façades Return XML?
      15. 30.15. Summary
    35. 31. Implementing the Case Study User Interface
      1. 31.1. User's Guide
        1. 31.1.1. Initial Screen
        2. 31.1.2. Create, Display, Modify Time Sheet for an Employee
        3. 31.1.3. Display Pending and Approved Time Sheets
        4. 31.1.4. Time Sheet Processing
      2. 31.2. Summary
    36. 32. An Introduction to J2EE Web Services for WebSphere
      1. 32.1. If Web Services Is the Solution, What's the Problem?
        1. 32.1.1. The Integration Problem
        2. 32.1.2. The Rise of Web Services
        3. 32.1.3. A Shared Understanding: Why XML?
        4. 32.1.4. What Is a Web Service?
      2. 32.2. Web Services Architecture
        1. 32.2.1. The Role of SOAP (Simple Object Access Protocol)
        2. 32.2.2. The Role of the Web Services Description Language (WSDL)
        3. 32.2.3. UDDI and the Problem of Service Location
        4. 32.2.4. Putting It All Together: The Service-Oriented Architecture
      3. 32.3. Web Services in J2EE
      4. 32.4. Web Services in WAS
      5. 32.5. The Standardization Nightmare
      6. 32.6. Summary
    37. 33. Constructing J2EE Web Services for WebSphere
      1. 33.1. Getting Started with Web Services
        1. 33.1.1. Creating the Service Endpoint Interface
        2. 33.1.2. Using WSDL to Express the Service Description
        3. 33.1.3. Understanding WSDL
        4. 33.1.4. Creating the Deployment Descriptors
          1. 33.1.4.1. Understanding the webservices.xml Deployment Descriptor
        5. 33.1.5. Updating the Deployment Descriptor
        6. 33.1.6. Preparing the Web Service for Deployment
        7. 33.1.7. Deploying the Web Service into WebSphere
        8. 33.1.8. Publishing the WSDL
        9. 33.1.9. Creating a Web Service in Summary
      2. 33.2. Building Web Service Clients
        1. 33.2.1. The J2SE Client
        2. 33.2.2. Building the J2EE Client
        3. 33.2.3. Running the WSAD Application Client
        4. 33.2.4. Running the Client from a Command Line
        5. 33.2.5. Inspecting the SOAP messages
          1. 33.2.5.1. Adding a WSDL Port
          2. 33.2.5.2. Understanding the SOAP Message
      3. 33.3. Summary
    38. 34. Web Services Architectures and Best Practices
      1. 34.1. Some Web Services Dos and Don'ts
      2. 34.2. Addressing the Limitations of Web Services
        1. 34.2.1. Multiple Business Delegates
        2. 34.2.2. WSDL and WSIF
      3. 34.3. Choosing the Right Level of Granularity in SOA
        1. 34.3.1. Unified Logical View
        2. 34.3.2. Replaceable Component
        3. 34.3.3. Composable Component
      4. 34.4. Interoperability Lessons Learned
        1. 34.4.1. Encoding Style and Interoperability
        2. 34.4.2. Binding Style and Interoperability
        3. 34.4.3. Choosing When to Use Document vs. RPC Binding Style
        4. 34.4.4. An Example of Document-Literal Processing in WebSphere
        5. 34.4.5. A Final Note about Interoperability
      5. 34.5. Summary
    39. 35. A Final Look
      1. 35.1. Application Layering
      2. 35.2. Case Study and J2EE Technologies
      3. 35.3. Tooling
      4. 35.4. A Parting Thought
    40. A. Installing Products and Examples from the CDs
      1. A.1. Installing the Products from the CDs
      2. A.2. Installing the Case Study Examples
        1. A.2.1. Installing the Project Interchange Feature
        2. A.2.2. Installing the Case Study
        3. A.2.3. Running the Case Study
        4. A.2.4. Installing the Web Services Example
    41. B. Constructing J2EE Web Services Using WSAD 5.1
      1. B.1. What's New?
      2. B.2. Creating the RandomIDGenerator Service
        1. B.2.1. Project Setup
        2. B.2.2. Create the RandomIDGenerator Service
      3. B.3. Running and Testing the RandomIDGenerator Service
        1. B.3.1. Using the Web Services Explorer
      4. B.4. Using the Existing J2SE Client
      5. B.5. Summary
    42. Bibliography
    43. Article
    44. About the CD-ROMs

    Product information

    • Title: Enterprise Java Programming with IBM WebSphere
    • Author(s): Peter M. Jakab, Russell Stinehour, Kyle Brown, Jim Amsden, David Pitt, Gary Craig, Mark Weitzel, Greg Hester, Daniel Berg
    • Release date: December 2003
    • Publisher(s): IBM Press
    • ISBN: None