DB2 for z/OS and WebSphere: The Perfect Couple

Book description

DB2 for z/OS is a high performance DBMS, with a very strong reputation in high volume transaction workloads based on relational technology. WebSphere Application Server is a transaction monitor based on object-oriented technology, very much in sync with the J2EE standard. Can we marry the object world and relational world to create a high-volume, high-performance end-to-end OLTP environment? The answers can be found in this IBM Redbooks publication.

This book gives a broad understanding of the installation, configuration, and use of the IBM DB2 Universal Driver for SQLJ and JDBC in a DB2 for z/OS and OS/390 Version 7, and DB2 for z/OS Version 8 environment, with IBM WebSphere Application Server for z/OS for z/OS Version 5.02. It describes both type 2 and type 4 connectivity (including the XA transaction support) from a WebSphere Application Server on z/OS to a DB2 for z/OS and OS/390 database server.

This publication also demonstrates the advantages of SQLJ in a DB2 environment, the SQLJ support in the IBM application development tool WebSphere Studio Application Developer, as well as the SQLJ support for Enterprise JavaBeans using container-managed persistence.

Please note that the additional material referenced in the text is not available from IBM.

Table of contents

  1. Figures (1/2)
  2. Figures (2/2)
  3. Tables
  4. Examples
  5. Notices
    1. Trademarks
  6. Preface
    1. The team that wrote this redbook
    2. Become a published author
    3. Comments welcome
  7. Chapter 1: Introduction to DB2 for z/OS and OS/390
    1. Relational database management systems
    2. The DB2 Universal Database Family
      1. DB2 UDB for Linux, UNIX®, and Windows®
      2. DB2 UDB for iSeries™
      3. DB2 Server for VSE and VM
      4. More information on the DB2 UDB family, related tools, and products
    3. Components of DB2 UDB for z/OS and OS/390
      1. DB2 UDB for z/OS and OS/390 address spaces
      2. DB2 attachment facilities
    4. DB2 data structures
      1. Databases
      2. Storage groups
      3. Data sets
      4. Table spaces
      5. Tables
      6. Indexes
    5. Structured query language (SQL)
      1. Static SQL
      2. Dynamic SQL
      3. Industry standards
    6. DB2 concepts
      1. Referential constraints
      2. DB2 packages, plans, collections, and package lists
      3. Schemas
    7. Accessing DB2 from a Java environment
      1. JDBC fundamentals
      2. JDBC driver types
      3. IBM DB2 Legacy Driver
    8. IBM DB2 Universal Driver for SQLJ and JDBC
      1. IBM z/OS Application Connectivity to DB2 for z/OS and OS/390
    9. Using the DB2 Universal Driver for SQLJ and JDBC
      1. Required environment variable settings
      2. DB2 Universal Driver stored procedures and metadata
      3. Binding DB2 Universal JDBC Driver packages with the DB2Binder utility
      4. DB2T4XAIndoubtUtil utility for DB2 UDB for OS/390 and z/OS Version 7
      5. Differences between the DB2 Universal Driver and DB2 Legacy Driver
      6. JDBC 3.0 APIs specific to the DB2 Universal Driver
  8. Chapter 2: Introduction to WebSphere for z/OS
    1. Java 2 Enterprise Edition (J2EE) overview
    2. WebSphere Application Server architecture
    3. WebSphere Application Server administration
      1. Administration console
      2. Other tools
    4. The WebSphere family
    5. WAS 5.0.2 features and J2EE support
  9. Chapter 3: WebSphere - DB2 environment
    1. Introduction to the sample scenario setup
    2. Introduction to DB2 drivers for Java
    3. Data source definitions in WAS V5
    4. The IBM DB2 Universal Driver for SQLJ and JDBC
      1. Summary of WAS z/OS external changes for the Universal Driver
    5. Configuring Universal JDBC Driver type 2 connectivity
      1. Specifying the Universal JDBC Driver provider
      2. Defining Data Sources under this provider (1/2)
      3. Defining Data Sources under this provider (2/2)
      4. Setting/verifying the symbolic environment variables
      5. Defining DB2 Universal Driver - General properties
      6. Searching for the package to execute
      7. Linking to the DB2 libraries
      8. Creating a new Application Server
    6. Configuring Universal JDBC Driver type 4 connectivity
      1. Using the Universal Driver for type 4 (non-XA)
      2. Using the Universal Driver for type 4 (XA) connectivity (1/2)
      3. Using the Universal Driver for type 4 (XA) connectivity (2/2)
    7. Summary
  10. Chapter 4: DB2 and Java architecture guide
    1. Introduction to J2EE data access architecture
    2. Servlets and JavaServer Pages
      1. Benefits of data access from servlets and JSPs
      2. Considerations for data access from a servlet
    3. Enterprise JavaBeans
    4. Session Beans
    5. Stateless session Beans
      1. Benefits of data access from a stateless session Bean
      2. Considerations
    6. Stateful session Beans
      1. Benefits of stateful session Beans
      2. Considerations
    7. Entity Beans
    8. Bean-Managed Persistence entity Beans
      1. Benefits
      2. Considerations
    9. Container-Managed Persistence entity Beans
      1. Benefits
      2. Considerations
    10. Message-driven Beans
    11. Session facade pattern
    12. Stored procedures
      1. Benefits of accessing data from stored procedures
      2. Considerations
    13. Web services
    14. SQLJ support
    15. Java Data Objects
    16. EJB Beans summary
  11. Chapter 5: DB2 application development in a WebSphere environment
    1. JDBC and SQLJ application programming comparison
      1. JDBC and SQLJ compared
      2. Best practices
    2. JDBC application programming concepts
      1. Java packages for JDBC applications
      2. Using the DB2 Universal JDBC Driver and the DataSource interface
      3. Java identifiers and JDBC parameter markers
      4. Statement and ResultSet interfaces
    3. SQLJ application programming concepts
    4. Preparing JDBC and SQLJ applications for execution
      1. JDBC program preparation process
      2. SQLJ program preparation process
    5. Impact of different DB2 bind options on Java applications
      1. OWNER bind option
      2. QUALIFIER bind option
      3. DYNAMICRULES bind option
      4. ISOLATION bind option
    6. Special registers
      5. Using properties to specify special registers
  12. Chapter 6: WebSphere - DB2 security
    1. Introduction to authentication, authorization, and auditing
      1. Authentication
      2. Authorization
      3. Auditing
      4. Application or infrastructure
      5. DB2-supported authentication, authorization, and auditing
      6. Choosing what identity to send DB2
      7. Configuring WebSphere for authentication
      8. Programmatic authentication
      9. Default user ID and password authentication
      10. Thread identity support
    2. DB2 auditing
  13. Chapter 7: SQLJ
    1. Writing SQLJ versus JDBC applications
      1. Connections
      2. Using SQLJ
      3. Using JDBC
    2. Profile customization
      1. Profile customization when using unqualified SQL
      2. Reducing the number of SQLJ-generated packages
      3. Using manual package versioning
    3. Application design
      1. Best practice
      2. The detailed application flow
      3. Exceptions and transactions
      4. SQL exceptions and SQL warnings
    4. SQLJ in WebSphere Studio Application Developer
      1. Setting up the environment
      2. Create the server and the datasource (1/2)
      3. Create the server and the datasource (2/2)
      4. Using an SQLJ Java project
      5. User-managed persistence (1/3)
      6. User-managed persistence (2/3)
      7. User-managed persistence (3/3)
      8. Container-managed persistence
      9. Customization
      10. WAS FixPak
    5. Deployment to WebSphere Application Server
    6. Summary
  14. Chapter 8: Transaction management in a WebSphere environment
    1. What transactions are
      1. Local transactions
      2. Global transactions
    2. WebSphere transaction management
      1. Transaction demarcation
      2. Bean-managed transactions and the UserTransaction interface
      3. Transaction types (for container-managed transactions)
    3. WebSphere resources and transaction support
      1. Resource interfaces
      2. Resource transaction isolation
      3. Configuring JDBC resources
    4. DB2 as a transaction manager
      1. Configuring and exploiting DB2 as a transaction manager
      2. DB2 configuration requirements
      3. DB2 or WAS as a transaction manager
    5. DB2 as a resource manager
      1. DB2’s support for XA
      2. Global transaction support
    6. Considerations for two-phase commit processing
      1. Lock duration
      2. Failure impact
      3. Lock impact from failure
      4. How to recover from failures
  15. Chapter 9: DB2 locking in a WebSphere environment
    1. DB2 locking
    2. Transaction isolation
      1. Isolation levels
      2. Overriding lock mode
      3. DB2 isolation determination in Java applications
      4. Maintaining integrity with isolation Cursor Stability
      5. Data sharing considerations
    3. WebSphere transaction-related deployment descriptors
      1. Setting the WebSphere transaction isolation level
      2. Entity Bean isolation level (access intent)
    4. Container-managed persistence generated SQL
      1. Who generates the persistence SQL
      2. Access intents
  16. Chapter 10: DB2 - WebSphere performance aspects
    1. Recommended hardware and software configuration
    2. WebSphere Application Server connection pooling
      1. What is new in Version 5 - What is in WebSphere Version 4
      2. How connection pooling works - How connection objects are structured
      3. WebSphere data sources
      4. Connection pooling - Best practices
    3. DB2 and JDBC
      1. Adjusting the number of DB2 threads and connections
      2. Enabling DB2 dynamic statement cache
      3. Choosing static SQL over dynamic SQL
      4. Usage guidelines for JCC type 2 and type 4 connectivity
      5. Enterprise JavaBeans (EJBs) and DB2 access
    4. WLM classification of WAS and its impact on DB2
      1. How DB2 and WebSphere Servers are structured on z/OS
      2. Enabling WLM dynamic application environments with WAS V5
      3. WebSphere classification and its impact on DB2
    5. Tuning the storage for z/OS and the Java Virtual Machine
    6. Universal Driver tracing
      1. Universal Driver tracing
      2. DB2SystemMonitor class
  17. Chapter 11: Sample application
    1. Introduction
      1. Sample table description
      2. Importing the tables into WSAD
    2. MVC model with entity Beans and a session Bean
      1. Creating entity CMP Beans using JDBC from the imported tables
      2. Container-managed persistence entity Beans with SQLJ (1/2)
      3. Container-managed persistence entity Beans with SQLJ (2/2)
      4. Bean and container-managed persistence entity Bean with SQLJ
      5. Bean-managed persistence entity Beans with JDBC
      6. Completing the model with the session Bean (1/2)
      7. Completing the model with the session Bean (2/2)
    3. The View component of the MVC model
    4. Controller component of MVC (1/2)
    5. Controller component of MVC (2/2)
    6. The enterprise J2EE application
    7. Deployment of the EAR file (1/2)
    8. Deployment of the EAR file (2/2)
    9. Test of the application
  18. Appendixes
  19. Appendix A: Additional material
    1. Locating the Web material
    2. Using the Web material
      1. How to use the Web material
  20. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. How to get IBM Redbooks
    5. Help from IBM
  21. Index (1/3)
  22. Index (2/3)
  23. Index (3/3)
  24. Back cover

Product information

  • Title: DB2 for z/OS and WebSphere: The Perfect Couple
  • Author(s): Bart Steegmans, Carsten Block, John De Dominicis, Sean Lee, Chao-Lin Liu, Egide Van Aerschot
  • Release date: January 2005
  • Publisher(s): IBM Redbooks
  • ISBN: None