100% found this document useful (1 vote)
16 views

Db2 Udb Ebusiness Guide Ibm Redbooks instant download

The document is a guide for DB2 UDB e-business, detailing its support for WebSphere, Java, and XML Extender. It includes information on JDBC support, Java application development, and problem determination in DB2 and WebSphere. The guide is published by IBM and is relevant for users of DB2 Universal Database Extended Edition Version 7 and WebSphere Advanced Edition Version 4.0.

Uploaded by

ggggggpaunov32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
16 views

Db2 Udb Ebusiness Guide Ibm Redbooks instant download

The document is a guide for DB2 UDB e-business, detailing its support for WebSphere, Java, and XML Extender. It includes information on JDBC support, Java application development, and problem determination in DB2 and WebSphere. The guide is published by IBM and is relevant for users of DB2 Universal Database Extended Edition Version 7 and WebSphere Advanced Edition Version 4.0.

Uploaded by

ggggggpaunov32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Db2 Udb Ebusiness Guide Ibm Redbooks download

https://ebookbell.com/product/db2-udb-ebusiness-guide-ibm-
redbooks-51388454

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Db2 Udbs Highfunction Business Intelligence In Ebusiness Ibm Redbooks

https://ebookbell.com/product/db2-udbs-highfunction-business-
intelligence-in-ebusiness-ibm-redbooks-51388450

Db2 Udb Exploitation Of The Windows Environment Ibm Redbooks

https://ebookbell.com/product/db2-udb-exploitation-of-the-windows-
environment-ibm-redbooks-51841914

Db2 Udb V8 And Websphere V5 Performance Tuning And Operations Guide


Ibm Redbooks

https://ebookbell.com/product/db2-udb-v8-and-websphere-v5-performance-
tuning-and-operations-guide-ibm-redbooks-974300

Sap Solutions On Ibm Db2 Udb V822 Handbook Wheijen Chen

https://ebookbell.com/product/sap-solutions-on-ibm-
db2-udb-v822-handbook-wheijen-chen-2166954
Oracle To Db2 Udb Conversion Guide Ibm Redbooks Wheijen Chen

https://ebookbell.com/product/oracle-to-db2-udb-conversion-guide-ibm-
redbooks-wheijen-chen-974302

Db2 Sql Pl Deployment And Advanced Configuration Essential Guide For


Db2 Udb On Linux Unix Windows I5os Zos Second Edition Zamil Janmohamed

https://ebookbell.com/product/db2-sql-pl-deployment-and-advanced-
configuration-essential-guide-for-db2-udb-on-linux-unix-windows-i5os-
zos-second-edition-zamil-janmohamed-977794

Advanced Dba Certification Guide And Reference For Db2 Udb V8 For
Linux Unix And Windows Dwaine R Snow

https://ebookbell.com/product/advanced-dba-certification-guide-and-
reference-for-db2-udb-v8-for-linux-unix-and-windows-dwaine-r-
snow-930792

Db2 Table Editor Tool Version 42 Ibm Redbooks

https://ebookbell.com/product/db2-table-editor-tool-version-42-ibm-
redbooks-51388442

Db2 Web Query Tool Version 12 Ibm Redbooks

https://ebookbell.com/product/db2-web-query-tool-version-12-ibm-
redbooks-51388448
Front cover

DB2 UDB e-business


Guide
A comprehensive guide to DB2 support
of WebSphere, Java, and XML Extender

DB2 as a Web service provider


using Application Developer

Problem determination in
DB2 and WebSphere

Rodolphe Michel
Lijun Gu
Tarun Bhatnagar
Richard Hewitt
JeongKwon Lee
Quentin Presley

ibm.com/redbooks
International Technical Support Organization

DB2 UDB e-business Guide

July 2002

SG24-6539-00
Take Note! Before using this information and the product it supports, be sure to read the
general information in “Notices” on page xvii.

First Edition (July 2002)

This edition applies to DB2 Universal Database (UDB) Extended Edition (EE) Version 7 and
WebSphere Advanced Edition Version 4.0.

Comments may be addressed to:


IBM Corporation, International Technical Support Organization
Dept. QXXE Building 80-E2
650 Harry Road
San Jose, California 95120-6099

When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the
information in any way it believes appropriate without incurring any obligation to you.

© Copyright International Business Machines Corporation 2002. All rights reserved.


Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to
restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
Contents

Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii

Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 2. Java enablement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


2.1 JDBC support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 What is JDBC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 DB2 JDBC support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.3 Advantages of using JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.4 JDBC 2.0 specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.5 Determining which version of JDBC that DB2 is using . . . . . . . . . . . 12
2.1.6 Changing the version of JDBC that DB2 is using . . . . . . . . . . . . . . . 13
2.1.7 DB2 and JDBC hints and tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Overview of DB2’s Java enablement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.1 Setting the environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 Java packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.3 Java file extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.4 SQL security in Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 SQLJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.1 What is SQLJ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.2 DB2 SQLJ support and restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.3 Calling stored procedures and functions within SQLJ. . . . . . . . . . . . 22
2.3.4 Compiling and running SQLJ applications . . . . . . . . . . . . . . . . . . . . 23
2.4 Accessing stored procedures and UDFs using Java. . . . . . . . . . . . . . . . . 25
2.4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.2 Registering stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.3 Running stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Chapter 3. Java application development for Web servers . . . . . . . . . . . . 31

Contents iii
3.1 DB2 UDB Universal Developer’s Edition V7.2 (UDE) . . . . . . . . . . . . . . . . 32
3.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2 WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.2 WebSphere Application Server Enterprise Edition V4.0 . . . . . . . . . . 35
3.2.3 WebSphere Application Server Advanced Edition V4.0 . . . . . . . . . . 38
3.2.4 WebSphere Application Server Standard Edition V3.5 . . . . . . . . . . . 41
3.3 The evolution of WebSphere tooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.1 Relationship between Site Developer and WebSphere Studio . . . . . 44
3.3.2 Relation between Application Developer and VisualAge for Java . . 44
3.4 WebSphere Studio Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.2 WebSphere Studio Site Developer . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.3 WebSphere Studio Application Developer . . . . . . . . . . . . . . . . . . . . 46
3.5 VisualAge for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.5.2 Professional Edition V4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5.3 Enterprise Edition V4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.6 DB2 Stored Procedure Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6.2 Installing and configuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.6.3 Concepts and terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.6.4 Choosing a language for your stored procedures . . . . . . . . . . . . . . . 55
3.6.5 Creating stored procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.6.6 Example stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Chapter 4. WebSphere Studio Application Developer . . . . . . . . . . . . . . . . 69


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.1.1 J2EE business topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.2 Application Developer workbench fundamentals . . . . . . . . . . . . . . . . . . . 72
4.2.1 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.2.2 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.2.3 Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.2.4 Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.2.5 Team development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3 Application Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3.1 Java development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.3.2 Web development tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.3.3 Web services development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.3.4 Enterprise JavaBeans (EJB) development environment. . . . . . . . . . 81
4.3.5 XML development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.3.6 Relational database environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.3.7 Testing and publishing tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

iv DB2 UDB e-business Guide


4.3.8 Performance profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.3.9 Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.4 Working with DB2 UDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.4.1 Creating a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.4.2 Connecting to databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.4.3 Importing DB designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.4.4 Creating new designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.4.5 Working with scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.4.6 Maintaining your design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.4.7 Querying databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Chapter 5. J2EE technical overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113


5.1 J2EE overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.2 J2EE platform components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.2.1 Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.2.2 J2EE server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.2.3 Resource driver manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.2.4 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.2.5 J2EE standard services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.3 Java Transaction Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.4 Enterprise JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Chapter 6. Create e-business applications . . . . . . . . . . . . . . . . . . . . . . . . 125


6.1 WebSphere programming environment . . . . . . . . . . . . . . . . . . . . . . . . . 126
6.1.1 WebSphere programming model . . . . . . . . . . . . . . . . . . . . . . . . . . 126
6.2 WebSphere application architecture support . . . . . . . . . . . . . . . . . . . . . 128
6.2.1 Web-based client/server applications . . . . . . . . . . . . . . . . . . . . . . . 128
6.2.2 Distributed object-based applications . . . . . . . . . . . . . . . . . . . . . . . 129
6.2.3 Web-based distributed applications . . . . . . . . . . . . . . . . . . . . . . . . 130
6.3 Content presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.3.1 Servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
6.3.2 JavaServer Pages (JSP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.4 Developing applications with VisualAge for Java . . . . . . . . . . . . . . . . . . 139
6.4.1 Developing servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
6.4.2 Developing JSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
6.4.3 Testing application using WebSphere Test Environment (WTE) . . 146
6.4.4 Deploying application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Chapter 7. Installing and configuring IBM WebSphere . . . . . . . . . . . . . . 165


7.1 Planning for WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . 166
7.1.1 Hardware requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
7.1.2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
7.1.3 Hardware used in our test environment . . . . . . . . . . . . . . . . . . . . . 172
7.1.4 Software used in our test environment . . . . . . . . . . . . . . . . . . . . . . 172

Contents v
7.2 WebSphere installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
7.2.1 Creating an Admin ID on Windows platforms . . . . . . . . . . . . . . . . . 173
7.2.2 Install IBM HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
7.2.3 Install database server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
7.2.4 Post-configuration for WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . 186
7.2.5 Install WebSphere Application Server. . . . . . . . . . . . . . . . . . . . . . . 188
7.2.6 Uninstall WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
7.3 Configuring WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.3.1 The administration model in WebSphere . . . . . . . . . . . . . . . . . . . . 196
7.3.2 Configuring WebSphere to host applications . . . . . . . . . . . . . . . . . 197

Chapter 8. Accessing DB2 UDB via WebSphere . . . . . . . . . . . . . . . . . . . 207


8.1 Configuring DB2 for Java applications . . . . . . . . . . . . . . . . . . . . . . . . . . 208
8.2 JDBC providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
8.2.1 What is a JDBC provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
8.2.2 Creating a JDBC Provider resource . . . . . . . . . . . . . . . . . . . . . . . . 210
8.3 Datasources in WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
8.3.1 What is a datasource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
8.3.2 Creating a datasource in WebSphere . . . . . . . . . . . . . . . . . . . . . . . 216
8.3.3 WebSphere datasource tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
8.4 Connection pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
8.4.1 WebSphere connection pooling implementation . . . . . . . . . . . . . . . 228
8.4.2 WebSphere statement cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.4.3 Benefits of WebSphere connection pooling . . . . . . . . . . . . . . . . . . 235
8.4.4 Who should use WebSphere connection pooling . . . . . . . . . . . . . . 236
8.4.5 What’s new In Version 4.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.4.6 Connection pooling best practices . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.4.7 Connection pooling worst practices . . . . . . . . . . . . . . . . . . . . . . . . 238
8.5 Connecting enterprise data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
8.5.1 Creating a connection to enterprise data . . . . . . . . . . . . . . . . . . . . 240
8.5.2 DB2 Connect connection pooling . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.5.3 DB2 Connect connection concentrator . . . . . . . . . . . . . . . . . . . . . . 243
8.5.4 DB2 Connect support for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.6 DB2 Connect and WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.7 WebSphere and DB2 UDB V7.2 EE clustering . . . . . . . . . . . . . . . . . . . . 247
8.7.1 Solaris 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.7.2 AIX 4.3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
8.7.3 Microsoft Windows NT/2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Chapter 9. DB2 application development extensions . ....... ...... . 259


9.1 DB2 Extenders overview . . . . . . . . . . . . . . . . . . . . . . . ....... ...... . 260
9.2 XML Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....... ...... . 263
9.2.1 Document Type Definition (DTD) . . . . . . . . . . . . ....... ...... . 264

vi DB2 UDB e-business Guide


9.2.2 Location path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
9.2.3 Administrative support tables, UDTs, and UDFs. . . . . . . . . . . . . . . 267
9.2.4 DTD repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
9.2.5 Document Access Definitions (DAD) . . . . . . . . . . . . . . . . . . . . . . . 269
9.2.6 XML Column method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
9.2.7 XML collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
9.2.8 XML Extender administration tools . . . . . . . . . . . . . . . . . . . . . . . . . 294
9.2.9 XML MQSeries enablement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
9.3 Text Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
9.3.1 Index types supported by Text Extender. . . . . . . . . . . . . . . . . . . . . 300
9.3.2 Search functions supported by all indexes . . . . . . . . . . . . . . . . . . . 302
9.3.3 Text document formats supported . . . . . . . . . . . . . . . . . . . . . . . . . 303
9.3.4 Text Extender administration UDFs . . . . . . . . . . . . . . . . . . . . . . . . 303
9.3.5 Text Extender application development . . . . . . . . . . . . . . . . . . . . . 304
9.4 Net Search Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
9.4.1 Inverted index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
9.4.2 Net Search Extender overall process . . . . . . . . . . . . . . . . . . . . . . . 309
9.4.3 What gets indexed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
9.4.4 Net Search uses in-memory tables . . . . . . . . . . . . . . . . . . . . . . . . . 312
9.4.5 Net Search indexing example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
9.4.6 Performing the search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
9.4.7 Net Search application development . . . . . . . . . . . . . . . . . . . . . . . 315
9.4.8 Index update considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9.4.9 Index size considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9.4.10 NetSearch benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
9.4.11 When should you use other extenders . . . . . . . . . . . . . . . . . . . . . 319
9.5 AIV Extenders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
9.5.1 How the audio, video, image data are stored . . . . . . . . . . . . . . . . . 320
9.5.2 Administrative support tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
9.5.3 Query By Image Content (QBIC) catalog for image type . . . . . . . . 323
9.5.4 Video indexes and shot catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.5.5 Application development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.6 Other tools and DB2 as a Web services extension . . . . . . . . . . . . . . . . . 326
9.6.1 Net.Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
9.6.2 DB2 MQ enablement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
9.6.3 DB2 as a Web services extension . . . . . . . . . . . . . . . . . . . . . . . . . 337

Chapter 10. Case study: IBM Video Central for e-business . . . . . . . . . . 359
10.1 Case study - business rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
10.1.1 IBM Video Central - business scenario . . . . . . . . . . . . . . . . . . . . . 360
10.1.2 IBM Video Central architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
10.1.3 IBM XML and Web Services Development Environment . . . . . . . 364
10.2 Application design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Contents vii
10.2.1 Class definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
10.2.2 Database design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
10.3 Installation and verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
10.3.1 Enabling the DB2 environment for IBM VideoCentral . . . . . . . . . . 381
10.3.2 WebSphere Studio Application Developer . . . . . . . . . . . . . . . . . . 388
10.3.3 Preparing the project in Application Developer . . . . . . . . . . . . . . . 391
10.3.4 Deployment to WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
10.3.5 Deploy the Web Services into WebSphere . . . . . . . . . . . . . . . . . . 401
10.3.6 Creating and running a sample client . . . . . . . . . . . . . . . . . . . . . . 408
10.3.7 Running the sample client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
10.3.8 Solving common problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

Chapter 11. Problem determination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425


11.1 Basic information for problem determination . . . . . . . . . . . . . . . . . . . . . 426
11.1.1 Determining the location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
11.1.2 Determining the problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
11.2 DB2 tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
11.2.1 db2diag.log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
11.2.2 JDBC trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
11.2.3 CLI trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
11.2.4 db2trc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
11.2.5 ddcstrc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
11.2.6 Putting the traces together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
11.3 WebSphere tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
11.3.1 Log and trap files in the administration server . . . . . . . . . . . . . . . 458
11.3.2 The stdout and stderr in the application server environment . . . . 459
11.3.3 Tracing the WebSphere administration server . . . . . . . . . . . . . . . 460
11.3.4 Tracing a WebSphere application server . . . . . . . . . . . . . . . . . . . 462
11.4 Difficult platform problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
11.4.1 DB2 and WebSphere on distributed platforms . . . . . . . . . . . . . . . 465
11.4.2 Using DB2 on S/390 for the WebSphere repository . . . . . . . . . . . 466

Related publications . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 469


IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 469
Other resources . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 469
Referenced Web sites . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 470
How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 472
IBM Redbooks collections . . . . . . . . . . . . . . . . . ...... ....... ...... . 472

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473

viii DB2 UDB e-business Guide


Figures

2-1 DB2 JDBC support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


2-2 DB2 Java applet implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2-3 DB2’s Java application implementation . . . . . . . . . . . . . . . . . . . . . . . . . 17
2-4 Application flow using a stored procedure . . . . . . . . . . . . . . . . . . . . . . . 26
3-1 WebSphere Application Server - overview . . . . . . . . . . . . . . . . . . . . . . 34
3-2 Components of the Advanced Edition server environment . . . . . . . . . . 40
3-3 WebSphere Studio evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3-4 Stored procedure builder topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3-5 Create a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3-6 Creating a Java stored procedure using wizard. . . . . . . . . . . . . . . . . . . 59
3-7 Java stored procedure wizard - Name . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3-8 Java stored procedure wizard - Pattern . . . . . . . . . . . . . . . . . . . . . . . . . 61
3-9 Java stored procedure wizard - SQL Statement . . . . . . . . . . . . . . . . . . 62
3-10 Java stored procedure wizard - Options . . . . . . . . . . . . . . . . . . . . . . . . 63
3-11 SPB display book after java_example build . . . . . . . . . . . . . . . . . . . . . . 64
3-12 SPB display book for results of running java_example . . . . . . . . . . . . . 65
3-13 SPB display messages after java_example run. . . . . . . . . . . . . . . . . . . 66
4-1 EJB multi-tier application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4-2 Basic Web services architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4-3 Web-centric application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4-4 Create new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4-5 Naming the new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4-6 New connection wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
4-7 Import database schema into folder. . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4-8 Creating a new database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4-9 Creating a new schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4-10 Creating a new table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4-11 Create columns in tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4-12 Create a SQL/DDL script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4-13 Editing SQL/DDL script file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4-14 Apply script to local database schema. . . . . . . . . . . . . . . . . . . . . . . . . 103
4-15 Generate SQL DDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4-16 Generated SQL/DDL file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4-17 Create script in DB2 script center . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4-18 Create an SQL query with SQL builder . . . . . . . . . . . . . . . . . . . . . . . . 108
4-19 Create an SQL statement using wizard . . . . . . . . . . . . . . . . . . . . . . . . 109
4-20 SQL wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5-1 Relationship of the J2EE application components . . . . . . . . . . . . . . . . 116

Figures ix
5-2 Java for transaction processing and messaging . . . . . . . . . . . . . . . . . 123
6-1 WebSphere programming environment . . . . . . . . . . . . . . . . . . . . . . . . 126
6-2 Web-based application architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . 129
6-3 Distributed object-based application architecture . . . . . . . . . . . . . . . . 130
6-4 Web-based distributed application architecture . . . . . . . . . . . . . . . . . . 131
6-5 Servlet runtime model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6-6 Life cycle of servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
6-7 JSP request through browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
6-8 Life cycle of JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6-9 HTML page SimpleHTTPServlet generates. . . . . . . . . . . . . . . . . . . . . 140
6-10 SimpleHTTPServlet code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6-11 Servlet SmartGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6-12 Configuring VisualAge for Java for WebSphere Studio interface . . . . 143
6-13 WebSphere test environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6-14 SimpleHTTPServlet code in workbench . . . . . . . . . . . . . . . . . . . . . . . 149
6-15 Servlet engine class path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
6-16 SimpleHTTPServlet response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6-17 default_app.webapp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
6-18 SimpleJSP response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
6-19 Export to a jar file window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
6-20 Specifying Web Module Properties panel . . . . . . . . . . . . . . . . . . . . . . 154
6-21 Add Files window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
6-22 Specifying Web Component Properties . . . . . . . . . . . . . . . . . . . . . . . . 156
6-23 Select file for Class name window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6-24 Add Servlet Mappings window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6-25 Specifying Application Properties panel. . . . . . . . . . . . . . . . . . . . . . . . 158
6-26 Confirm values window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6-27 Specifying the Application or Module panel . . . . . . . . . . . . . . . . . . . . . 160
6-28 WebSphere Advanced Administrative Console window . . . . . . . . . . . 161
6-29 WebSphere Advanced Admin Console window. . . . . . . . . . . . . . . . . . 162
6-30 Output requested by SimpleHTTPServlet . . . . . . . . . . . . . . . . . . . . . . 163
7-1 Group memberships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7-2 Choose destination window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
7-3 Setup type window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
7-4 Information for Service Setup window . . . . . . . . . . . . . . . . . . . . . . . . . 176
7-5 Welcome page of IBM HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . 177
7-6 Select Products window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
7-7 Select Installation Type window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7-8 Choose Destination window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7-9 Enter username and password for Control Center Server . . . . . . . . . . 181
7-10 Install OLAP Starter Kit window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7-11 Choose Destination Location window - install WAS4_FP3 . . . . . . . . . 182
7-12 Choose Destination Location window - install fixpack 4 . . . . . . . . . . . 183

x DB2 UDB e-business Guide


7-13 Services window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7-14 Installation Options window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
7-15 Security Options window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
7-16 Product Directory window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
7-17 Database options window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
7-18 WebSphere Advanced Administrative Console . . . . . . . . . . . . . . . . . . 193
7-19 Snoop servlet example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
7-20 WebSphere Administrative Console . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7-21 Application Server properties panel . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
7-22 Web Container Service window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
7-23 Create Virtual Host window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
7-24 Web Container Service window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
7-25 EJB Container Service window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
7-26 Session Manager Service window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
8-1 Create new JDBC Provider resource . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8-2 JDBC Provider properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
8-3 Select an implementation class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
8-4 Select node dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8-5 Select driver files dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8-6 Specify driver path dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
8-7 Success dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
8-8 Datasource properties dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
8-9 Console expanded into default server . . . . . . . . . . . . . . . . . . . . . . . . . 219
8-10 Choose DataSource dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
8-11 Hit count servlet Web page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
8-12 Hit count servlet using EJB to update the underlying database. . . . . . 222
8-13 Result of "SELECT * FROM INC" . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
8-14 Connection pooling tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
8-15 Valid states of a connection object . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
9-1 XML Extender overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
9-2 Hierarchical structure of a book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
9-3 XML column method overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
9-4 XML column method - user tables and side tables . . . . . . . . . . . . . . . 278
9-5 XML collection method overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
9-6 XML collection mapping scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
9-7 Text Extender - Stop Word Filtering process overview . . . . . . . . . . . . 299
9-8 Net Search Extender overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
9-9 Net Search indexing overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
9-10 User table and administrative tables . . . . . . . . . . . . . . . . . . . . . . . . . . 322
9-11 SOAP, UDDI, and WSDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
9-12 Web services available to a range of clients . . . . . . . . . . . . . . . . . . . . 343
9-13 Web service request - response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
9-14 WSDL components overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

Figures xi
9-15 Logic flow of a Web service using SOAP. . . . . . . . . . . . . . . . . . . . . . . 353
10-1 IBM VideoCentral business overview . . . . . . . . . . . . . . . . . . . . . . . . . 361
10-2 Web Services provider, requester, and broker . . . . . . . . . . . . . . . . . . 363
10-3 IBM Video Central Web service architecture overview . . . . . . . . . . . . 364
10-4 Sequence diagram for Add Customer Infraction . . . . . . . . . . . . . . . . . 370
10-5 Sequence diagram for Query Customer Infraction . . . . . . . . . . . . . . . 372
10-6 Class diagram for Customer Infraction Web service . . . . . . . . . . . . . . 373
10-7 Sequence diagram for Add Wish List. . . . . . . . . . . . . . . . . . . . . . . . . . 375
10-8 Class diagram for Wish List Web service . . . . . . . . . . . . . . . . . . . . . . 377
10-9 IBMVideoCentral overall class diagram . . . . . . . . . . . . . . . . . . . . . . . . 378
10-10 Diagram of the logical data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
10-11 Configuring the server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
10-12 Server instance created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
10-13 Configuring the data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
10-14 Add external .jar files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
10-15 Adding the Web project to the server. . . . . . . . . . . . . . . . . . . . . . . . . . 397
10-16 Properties for the VideoCentral Web project . . . . . . . . . . . . . . . . . . . . 397
10-17 Before importing the .jar files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
10-18 Select resources to import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
10-19 After preparing Video Central project. . . . . . . . . . . . . . . . . . . . . . . . . . 400
10-20 Selecting the Web Service to be deployed . . . . . . . . . . . . . . . . . . . . . 402
10-21 Java Bean to be deployed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
10-22 Configuring the Java Bean as a Web service . . . . . . . . . . . . . . . . . . . 404
10-23 Select the public methods to deploy . . . . . . . . . . . . . . . . . . . . . . . . . . 405
10-24 Web Service binding proxy generation . . . . . . . . . . . . . . . . . . . . . . . . 406
10-25 Content of WSDL file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
10-26 All Web Services deployed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
10-27 Components of Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
10-28 Class diagram for Video Centrals sample client, VideoClient . . . . . . . 410
10-29 Sequence diagram for Video Central’s sample client, Video Client . . . 411
10-30 Add external JAR files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
10-31 Adding the Client Web Project to the server . . . . . . . . . . . . . . . . . . . . 413
10-32 Highlight source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
10-33 Importing the client code from a .zip file into VideoClient . . . . . . . . . . 415
10-34 Highlight webApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
10-35 File system window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
10-36 Successful import of Video Central’s Client, VideoClient. . . . . . . . . . . 418
10-37 Generating the BusinessRegistrationProxy . . . . . . . . . . . . . . . . . . . . . 419
10-38 Checkpoint for creating proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
10-39 Adding the client servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
11-1 JDBC trace point example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
11-2 Contents for common section of CLI configuration . . . . . . . . . . . . . . . 432
11-3 CLI trace point example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

xii DB2 UDB e-business Guide


11-4 Default server log file location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
11-5 Services tab for the default server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
11-6 Trace services properties window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

Figures xiii
xiv DB2 UDB e-business Guide
Tables

7-1 Windows NT software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 167


7-2 Windows 2000 software requirements . . . . . . . . . . . . . . . . . . . . . . . . . 168
7-3 AIX software requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
7-4 Solaris software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
7-5 Linux software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
7-6 Windows NT software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 170
7-7 Windows 2000 software requirements . . . . . . . . . . . . . . . . . . . . . . . . . 170
7-8 AIX software requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
7-9 Solaris software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
7-10 Linux software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
8-1 Connection life cycle transition conditions . . . . . . . . . . . . . . . . . . . . . . 229
9-1 Administrative support tables created . . . . . . . . . . . . . . . . . . . . . . . . . 267
9-2 UDTs created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
9-3 UDFs created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
9-4 Stored procedures created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
9-5 RBOOK_TITLE_SUB_LEAD_SIDETAB . . . . . . . . . . . . . . . . . . . . . . . 274
9-6 RBOOK_AUTHORNAME_SIDETAB . . . . . . . . . . . . . . . . . . . . . . . . . . 275
9-7 EMPLOYEE table in SAMPLE database . . . . . . . . . . . . . . . . . . . . . . . 289
9-8 EMP_ACT table in SAMPLE database . . . . . . . . . . . . . . . . . . . . . . . . 290
9-9 Mapping XML document to database . . . . . . . . . . . . . . . . . . . . . . . . . 290
9-10 XML MQ stored procedures and functions . . . . . . . . . . . . . . . . . . . . . 296
9-11 SAMPLE table before enabling column for use with Text extender . . . 305
9-12 SAMPLE table after enabling column for use with Text extender . . . . 305
9-13 Document containing word tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
9-14 Word tokens existing in documents . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
9-15 Attributes common to image, audio, video objects . . . . . . . . . . . . . . . 321
9-16 Image attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
11-1 Commonly used trace strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
11-2 Patches required for a DB2 for S/390 administration repository . . . . . 466
11-3 DSNZPARMS required for DB2 for S/390 administration repository . . 466

Tables xv
xvi DB2 UDB e-business Guide
Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.

Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.

This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.

© Copyright IBM Corp. 2002 xvii


Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:

AFS® Informix® RS/6000®


AIX® MQSeries® S/390®
AS/400® Net.Data® SP™
CICS® Netfinity® SP1®
DB2® NUMA-Q® SP2®
DB2 Connect™ OS/2® Tivoli®
DB2 Extenders™ OS/390® TXSeries™
DB2 Universal Database™ PC 300® VisualAge®
DRDA® Perform™ WebSphere®
e (logo)® QMF™ z/OS™
Encina® QBIC® zSeries™
IBM® Redbooks™
IMS™ Redbooks Logo™

The following terms are trademarks of International Business Machines Corporation and Lotus Development
Corporation in the United States, other countries, or both:

Lotus® Domino™ Notes®

The following terms are trademarks of other companies:

ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United
States, other countries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.

C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET Secure
Electronic Transaction LLC.

Other company, product, and service names may be trademarks or service marks of others.

xviii DB2 UDB e-business Guide


Preface

IBM e-business is a major initiative. IBM WebSphere software platform for


e-business is a comprehensive set of award-winning software and integrated
e-business solutions. It is a software platform based on industry standards like
Java, XML and J2EE technologies. Strong support of these features within DB2
is essential for deploying e-business applications with DB2. DB2 Universal
Database (UDB) supports all the key Internet standards, making it an ideal
database for use on the Web. It has in-memory speed to facilitate Internet
searches and complex text matching combined with the scalability and
availability characteristics of a relational database. DB2 Universal Database
supports WebSphere, Java, and XML Extender, which makes it easy for you to
deploy your e-business applications.

This IBM Redbook examines the IBM approach to e-business and discusses how
the products in the DB2/WebSphere family provide solutions to your e-business
challenges. It also looks at some of the other tools available with WebSphere and
how they fit into IBM’s overall approach.

Chapter 1 gives an introduction.

Chapter 2 provides an overview of how the Java environment is set up during


DB2 installation, and descriptions of the JDBC and SQLJ interfaces and how to
call stored procedures and user defined function from Java programs.

Chapter 3 provides an overview of the products and tools available for developing
Java applications within a DB2/WebSphere environment.

Chapter 4 takes a closer look at the WebSphere Studio Application Developer


environment.

Chapter 5 provides an overview of the Java 2 Platform, Enterprise Edition


specifications.

Chapter 6 describes the WebSphere programming environment and supported


architecture by WebSphere Application Server, servlets, and JSPs to present
information and steps about how to develop e-business applications with IBM
products, such as DB2, WebSphere, VisualAge for Java.

Chapter 7 describes hardware and software requirements for WebSphere


Application Server and the steps needed to install WebSphere Advanced Edition
V4.0.

© Copyright IBM Corp. 2002 xix


Chapter 8 describes methods of improving database connection use, as well as
some catches you may run across when trying to access enterprise data.

Chapter 9 discusses the various application extensions available to extend the


capability of DB2 to manage files of different media types, and discusses the
tools that make it easy to integrate DB2 with messaging systems, provide easy
data access over the Internet, and DB2 as a Web services extension.

Chapter 10 provides a complete working application of IBM Video Central.

Chapter 11 discusses the basics of how to setup four common traces in DB2,
which are necessary to problem determination in DB2 and WebSphere.

The team that wrote this redbook


This redbook was produced by a team of specialists from around the world
working at the International Technical Support Organization, San Jose Center.

Rodolphe Michel, a former Project Leader at the International Technical


Support Organization (ITSO), San Jose Center, California (USA), conducted
projects in all areas of DB2 Universal Database (DB2 UDB). He has more than
20 years of experience in Database Management Systems. He has written
extensively and taught IBM classes and workshops worldwide in all areas of
DB2 Universal Database, and has presented at conferences all around the
world. He holds a doctorate in Computer Science.

Lijun Gu is a Project Leader at the International Technical Support Organization


(ITSO), San Jose Center, California (USA), where she conducts projects in all
aspects of DB2 Universal Database (DB2 UDB). She is an IBM-Certified Solution
Expert of DB2 UDB Database Administrator and an IBM-Certified Specialist DB2
UDB User. She has extensive experience in DB2 UDB and ADSM administration
as well as database design and modeling. She holds three master’s degrees: MS
in Computer Science, MS in Analytical Chemistry and MS in Soil Science.

Tarun Bhatnagar is an I/T Architect in the Enterprise Application Development


practice of IBM Global Services in New York. He has 13 years of experience in
Business Application design, development, and implementation. He has worked
at IBM for five years. His areas of expertise include Web and client server
application architecture and design, development, and deployment, database
design, application integration and testing. He holds a master’s degree in
Computer Science and Applications from the Birla Institute of Technology. He has
worked on some very large customer situations and written extensively on the
DB2 Extenders and the Web services. He is also a Cisco-Certified Network
Associate.

xx DB2 UDB e-business Guide


Richard Hewitt is a Senior IT Specialist at the IBM Hursley Laboratory, United
Kingdom. He has 10 years of experience in the DB2 area and two years
experience of DB2/WebSphere integration. His areas of expertise include
physical design, capacity planing, problem determination and performance
tuning of DB2 in a WebSphere environment. He has written extensively on Java
enablement within DB2 and on creating e-business applications using DB2 UDB.

JeongKwon Lee is an Advisory IT Specialist in at IBM Korea. He has three


years of experience in the DB2/WebSphere field. He holds a degree in Computer
Science from Seogang University (Korea). His areas of expertise include
performance tuning and capacity planing in a DB2 environment. He has written
extensively on creating e-business applications, and installing/configuring
WebSphere.

Quentin Presley is a Software Engineer at the IBM Toronto Laboratory, Canada.


He has two years of experience in the DB2/WebSphere integration field. He
holds a degree in Computer Science from Lakehead University (Canada). His
areas of expertise include DB2 and WebSphere. He has written extensively on
connecting WebSphere and DB2, connection pooling, and problem
determination.

Thanks to the following people for their contributions to this project:


Grant Hutchison
Benita Hsueh
Peter He
Connie Tsui
Yiying Zhang
Robert Indrigo
Steve Rapudic
Xin Chen
Aslam Nomani
Lan Pham
Andy Beaton
Enzo Cialini
Gene Thomas
Darrin Woodard
IBM Toronto Laboratory, Canada

Jeffrey Rodrigues
Stewart Tates
Gary Wilmot
Susan Malaika
IBM Silicon Valley Laboratory, San Jose, USA

Preface xxi
Manmeet Ahluwalia
Vijay Marwaha
IBM Global Services, New York, USA

Iain Boyle
IBM Hursley, United Kingdom

Debra Erickson
Shawn Lauzon
Melissa Modjeski
IBM Rochester, USA

Kalyan Narayanan
Freelance Enterprise Systems Architect

Santosh Kulkarni
Freelance DB2 Database Consultant

Notice
This publication is intended to help professional Java Programmers, Database
Administrators, System Administrators and System Designers to deploy
e-business applications using DB2 Universal Database (UDB) Extended Edition
(EE) Version 7 and WebSphere Advanced Edition Version 4.0. The information in
this publication is not intended as the specification of any programming interfaces
that are provided by DB2 Universal Database (UDB) Extended Edition (EE)
Version 7 and WebSphere Advanced Edition Version 4.0. See the
PUBLICATIONS section of the IBM Programming Announcement for DB2
Universal Database (UDB) Extended Edition (EE) Version 7 and WebSphere
Advanced Edition Version 4.0 for more information about what publications are
considered to be product documentation.

Comments welcome
Your comments are important to us!

We want our Redbooks to be as helpful as possible. Send us your comments


about this or other Redbooks in one of the following ways:
򐂰 Use the online Contact us review redbook form found at:
ibm.com/redbooks
򐂰 Send your comments in an Internet note to:

xxii DB2 UDB e-business Guide


[email protected]
򐂰 Mail your comments to the address on page ii.

Preface xxiii
xxiv DB2 UDB e-business Guide
1

Chapter 1. Introduction
IBM e-business is a major initiative. IBM WebSphere software platform for
e-business is a comprehensive set of award-winning software and integrated
e-business solutions. It is a software platform based on industry standards like
Java, XML and J2EE technologies. Deep support of these features within DB2 is
essential for deploying e-business applications with DB2. DB2 Universal
Database (UDB) supports all the key Internet standards, making it an ideal
database for use on the Web. It has in-memory speed to facilitate Internet
searches and complex text matching combined with the scalability and
availability characteristics of a relational database. DB2 Universal Database
supports WebSphere, Java, and XML Extender, which makes it easy for you to
deploy your e-business applications.

This redbook examines the IBM approach to e-business and discusses how the
products in the DB2/WebSphere Family provide solutions to your e-business
challenges. It also looks at some of the other tools available with the WebSphere
Family and how they fit into IBM’s overall approach.

This book starts by providing an overview of how the Java environment is set up
during DB2 installation, how to change these defaults and the additional
configuration options to run Java programs. We describe the JDBC and SQLJ
interfaces and how to call stored procedures and user defined function from Java
programs. We also look at the products and tools available for developing Java
applications within a DB2/WebSphere environment.

© Copyright IBM Corp. 2002 1


We take a closer look at the WebSphere Studio Application Developer
environment. (Also referred to simply as Application Developer, within this
redbook.) In particular we focus on the data perspective within Application
Developer and how it can be used to import, create and maintain relational
schemas for DB2 UDB databases.

We provide an overview of the Java 2 Platform, Enterprise Edition specifications.


J2EE Platform specifications provide the specifications for a standard platform
for hosting J2EE applications. These specifications define the standard services
for each of the application components that make up a of a multi-tiered
application. We give an introduction of the various standard services based on
the J2EE Platform Specifications. Our main focus will be the Java Transaction
Management specifications and Java Transaction API (JTA), and Enterprise
JavaBean Specification with emphasis on entity beans.

We describe the WebSphere programming environment and supported


architecture by WebSphere Application Server, Servlets and JSPs to present
information and steps how to develop e-business application with IBM Products,
such as DB2, WebSphere, VisualAge for Java. We describe the hardware and
software requirements for WebSphere Application Server and the steps needed
to install WebSphere Advanced Edition V4.0 and to configure it to work with the
other related products, such as Web server and database servers on Windows
platforms.

We also review methods of improving database connection use, as well as some


catches you may run across when trying to access enterprise data. We first
discuss the various application extensions available to extend the capability of
DB2 to manage files of different media types, and provide powerful search
capabilities. We then discuss the tools that make it easy to integrate DB2 with
messaging systems, provide easy data access over the Web, and DB2 as a Web
services extension. We cover the products identified under the DB2 Extender
family of products (XML Extender, Text Extender, Net Search Extender, Audio
Image Video (AIV) Extenders), as well as Net.data, DB2 MQ Enablement, DB2
as a Web Services extension.

This book provides a complete working application the "IBM Video Central",
including a step-by-step guide designed to demonstrate DB2 as a Web service
provider, and the WebSphere Studio Application Developer toolkit. Specifically,
the case study demonstrates a Web service built with technologies including:
Simple Object Access Protocol (SOAP), Web Services Description Language
(WSDL), and Universal Description, Discover and Integration (UDDI)
specification.

2 DB2 UDB e-business Guide


This case study includes complete documentation required to successfully
deploy six Web services to a WebSphere Application Server. A client application
is also provided to demonstrate these Web services in action. The DB2 XML
Extender’s dynamic XML mapping capabilities are also demonstrated in this
case study. We also demonstrate how to use Net Search Extender for
performing searches over the net.

Problem determination in DB2 and WebSphere has become a difficult process


for some problems with the use of multi-threading in Java, as well as, but not
limited to, the ideas of connection pooling and PreparedStatement cache.

This book discusses the basics of how to setup four common traces in DB2: CLI
Trace, JDBC Trace, db2trc, ddcstrc, db2diag.log. Finally the book covers some
of the patches and prerequisites required for such things as using an enterprise
system to store the WebSphere repository database.

Chapter 1. Introduction 3
4 DB2 UDB e-business Guide
2

Chapter 2. Java enablement


This chapter provides an overview of how the Java environment is set up during
DB2 installation, how to change these defaults and the additional configuration
options to run Java programs.

Also contained in this chapter are descriptions of the JDBC and SQLJ interfaces
and how to call stored procedures and user defined function from Java programs.

This chapter contains the following sections:


򐂰 JDBC support within DB2
򐂰 An overview of the Java environment and how to set it up
򐂰 SQLJ support within DB2
򐂰 Using stored procedures and UDFs from Java

© Copyright IBM Corp. 2002 5


2.1 JDBC support
This section contains an overview and details about JDBC.

2.1.1 What is JDBC?


To understand JDBC, knowing about its purpose and background is helpful. Sun
Microsystem's JavaSoft developed the specifications for a set of APIs that allow
Java applications to access relational data. The purpose of the APIs is to provide
a generic interface for writing platform-independent applications that can access
any SQL database.

The APIs are defined within 16 interfaces and classes that support basic SQL
functionality for connecting to a database, executing SQL statements, and
processing results. Together, these interfaces and classes represent the JDBC
capabilities by which a Java application can access relational data.

DB2's Java support includes JDBC, a vendor-neutral dynamic SQL interface that
provides data access to your application through standardized Java methods.
JDBC is similar to DB2 CLI in that you do not have to precompile or bind a JDBC
program. As a vendor-neutral standard, JDBC applications offer increased
portability.

Note: An application written using JDBC uses only dynamic SQL.

2.1.2 DB2 JDBC support


JDBC defines four different ways a JDBC driver can be implemented (see
Figure 2-1).
򐂰 JDBC Driver Type 1 was the first driver available on the market. It was
provided by Sun itself and is just using an existing ODBC driver. It is the
slowest and should only then be used if there is no real driver available for
that database product.
򐂰 JDBC Driver Type 2 is available for most databases. It sits on top of a
database API (like CLI for DB2). This means it is similar to type 1, but this
time vendor specific. The database access code is implemented in a shared
library (usually written in C) and loaded by the Java-part of the driver via JNI.
This driver requires database software installed on the machine where the
application executes.
򐂰 JDBC Driver Type 3 is similar to type 2. The difference is that the C-part of
the driver is here implemented as a daemon which is accessed via TCP/IP
sockets from the Java-part. The advantage compared to type 2 is that there is

6 DB2 UDB e-business Guide


no database software required on the local machine. This is important for
Applets where type 2 cannot be used. The drawback is a worse performance
compared to type 2.
򐂰 JDBC Driver Type 4 is pure Java. It talks over a database native network
protocol directly with the database server. It acts like a full database client.

Java Application/Applet
4 defined
JDBC
Driver Types:
JDBC API

Pure Java and


Pure Java
Native Protocol

JDBC-ODBC DB Protocol
Partial Java
Bridge

ODBC DB
DB Lib
Driver Middleware

Type 1 Type 2 Type 3 Type 4

Figure 2-1 DB2 JDBC support

Note: DB2 provides implementations for JDBC driver type 2 and type 3. With
DB2 UDB version 8 a JDBC driver type 4 will be made available.

2.1.3 Advantages of using JDBC


DB2 JDBC offers a number of advantages for accessing DB2 data:
򐂰 Using the Java language, you can write an application on any platform and
execute it on any platform to which the Java Development Kit (JDK) is ported.

Chapter 2. Java enablement 7


򐂰 The ability to develop an application once and execute it anywhere offers the
potential benefits of reduced development, maintenance, and systems
򐂰 The JDBC interface offers the ability to change between drivers and access a
variety of databases without recoding your Java program.
򐂰 JDBC applications do not require precompiling.

2.1.4 JDBC 2.0 specifications


The JDBC API was designed to provide a Java application programming
interface to data access of relational databases. JDBC 1.0 provided the basic
functionality for this access. JDBC 2.0 API extends the JDBC 1.0 API to provide
additional functionality, simplify coding, and increase performance.

JDBC 2.0 is divided into the JDBC 2.0 Core API, which is a superset of JDBC
1.0, and the JDBC 2.0 Optional Package API, which provides support for JNDI
(Java Naming and Directory Interface), connection pooling, and JTA (Java
Transaction API).

JDBC 2.0 Core API


Java applications can access a relational database directly through a JDBC
driver using the JDBC 2.0 Core API. Accessing a relational database in this
manner is done through three basic steps:
1. Establish a connection through the DriverManager class.
2. Send SQL queries or updates to the DBMS.
3. Process the results.

The following code fragment (Example 2-1) shows a simple example of obtaining
and using a connection directly through a JDBC driver.
Example 2-1 JDBC 2.0 Core API connection code example
try {
//establish a connection through the DriverManager
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
String url = "jdbc:db2:sample";
String username = "dbuser";
String password = "passwd";
java.sql.Connection conn =
java.sql.DriverManager.getConnection(url,username,
password);
//query the database
java.sql.Statement stmt = conn.createStatement();
java.sql.ResultSet rs =
stmt.executeQuery("SELECT EMPNO, FIRSTNME, LASTNAME
FROM EMPLOYEE");

8 DB2 UDB e-business Guide


//process the results
while (rs.next()) {
String empno = rs.getString("EMPNO");
String firstnme = rs.getString("FIRSTNME");
String lastname = rs.getString("LASTNAME");
//work with results
}
} catch (java.sql.SQLException sqle) {
//handle the SQLException
} finally {
try {
if(rs != null) rs.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
try {
if(stmt != null) stmt.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
try {
if(conn != null) conn.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
}

In the example code the first action is to establish a connection to the database.
This is done by loading and registering the JDBC driver and then requesting a
connection from DriverManager.

DriverManager is a JDBC 1.0 class and is the basic service for managing a set
of JDBC drivers.

It is necessary to load the driver class before the call to getConnection(),


because DriverManager can establish a connection only to a driver that has
registered with it. Loading the driver class also registers it with DriverManager.

After a connection has been obtained, the database is queried by creating a


statement and executing a query on that statement. The query results are put
into a ResultSet object.

Lastly, the results are processed by stepping through the result set and pulling
the data from each record retrieved.

Chapter 2. Java enablement 9


JDBC 2.0 Optional Package API
The JDBC 2.0 Optional Package API is an extension of the JDBC 2.0 Core API.
The optional extension supports integration with the new Java standards,
including JNDI (Java Naming and Directory Interface), JTA (Java Transaction
API), and EJB (Enterprise JavaBeans) as well as providing support for
connection pooling and the JavaBeans specification.

In JDBC 1.0 and the JDBC 2.0 Core API, DriverManager was used exclusively
for obtaining a connection to a database. The database URL, username, and
password were used in the getConnection request. In the JDBC 2.0 Optional
Package API, the datasource provides a new means of obtaining connections to
a database.

The benefit of using the DataSource model is the creation and management of
the connection factory is centralized. Applications do not need to have specific
information such as the database name, user name, or password in order to
obtain a connection to the database.

The steps for obtaining and using a connection in the JDBC 2.0 Optional
Package API paradigm differ slightly from the JDBC 2.0 Core API example.

Using the extensions, follow these steps:


1. Retrieve a DataSource object from the JNDI naming service.
2. Obtain a Connection object from the datasource.
3. Send SQL queries or updates to the DBMS.
4. Process the results.

The following code fragment (Example 2-2) shows how to obtain and use a
connection in the JDBC 2.0 Optional Package API through a datasource defined
in the WebSphere Application Server packages:
Example 2-2 JDBC 2.0 Optional API connection code example
try {
6.//Retrieve a DataSource through the JNDI Naming Service
java.util.Properties parms = new java.util.Properties();
parms.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
//Create the Initial Naming Context
javax.naming.Context ctx = new
javax.naming.InitialContext(parms);
//Lookup through the naming service to retrieve a
//DataSource object
//In this example, SampleDB is the datasource
javax.sql.DataSource ds =
(javax.sql.DataSource)

10 DB2 UDB e-business Guide


ctx.lookup("java:comp/env/jdbc/SampleDB");
//Obtain a Connection from the DataSource
java.sql.Connection conn =
ds.getConnection();
//query the database
java.sql.Statement stmt = conn.createStatement();
java.sql.ResultSet rs =
stmt.executeQuery("SELECT EMPNO, FIRSTNME, LASTNAME
FROM EMPLOYEE");
//process the results
while (rs.next()) {
String empno = rs.getString("EMPNO");
String firstnme = rs.getString("FIRSTNME");
String lastname = rs.getString("LASTNAME");
// work with results
}
} catch (java.sql.SQLException sqle) {
//handle SQLException
} finally {
try {
if (rs != null) rs.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
try {
if (stmt != null) stmt.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
try {
if (conn != null) conn.close();
} catch (java.sql.SQLException sqle) {
//can ignore
}
}

In the code example (Example 2-2) the first action is to retrieve a DataSource
object from the JNDI name space. This is accomplished by creating a Properties
object of parameters used to set up an InitialContext object. Once a context is
obtained, a lookup on the context is performed to find the specific datasource
necessary, in this case, the SampleDB datasource.

In this example, it is assumed the data source has already been created and
bound into JNDI by the WebSphere administrator.

Chapter 2. Java enablement 11


After a data source object is obtained, the application code calls getConnection()
on the datasource to get a Connection object. Once the connection is acquired,
the querying and processing steps are the same as for the JDBC 1.0 / JDBC 2.0
Core API example.

Important: In contrast to the JDBC 2.0 Core API example, the connection
obtained in this example (Example 2-2) from the datasource is a pooled
connection. This means that the Connection object is obtained from a pool of
connections managed by WebSphere connection pooling.

For more information on connection pooling see 8.4, “Connection pooling” on


page 227.

WebSphere Application Server version 4.0 changes


򐂰 The initial context factory name has changed:
– In Version 3.5, com.ibm.ejs.ns.jndi.CNInitialContextFactory
– In Version 4.0, com.ibm.websphere.naming.WsnInitialContextFactory
򐂰 In Version 4.0, the JNDI lookup string has changed:
– In Version 3.5, the lookup is:
javax.sql.DataSource ds =(javax.sql.DataSource)
ctx.lookup("jdbc/SampleDB");
– In Version 4.0, the lookup is:
javax.sql.DataSource ds =(javax.sql.DataSource)
ctx.lookup("java:comp/env/jdbc/SampleDB");

Both lookups work in Version 4.0, but all new applications should be written with
the version 4.0 syntax, which is the J2EE 1.2-compliant lookup method.

For more information on the details on the JDBC 2.0 Core Package API and the
JDBC 2.0 Optional Package API, refer to the JDBC 2.0 Optional Package API
Specification at http://java.sun.com

2.1.5 Determining which version of JDBC that DB2 is using


The JDBC 2.0 driver is a prerequisite for WebSphere Application Server. The
configuration of DB2 to use the JDBC 2.0 driver is part of the WebSphere
Application Server installation process (see Chapter 7, “Installing and configuring
IBM WebSphere” on page 165 for more details).

The following section tells you how to check which JDBC driver that DB2 is
currently configured to use.

12 DB2 UDB e-business Guide


Determining the level of JDBC in use for DB2 on Windows NT
To see whether JDBC 1.x or 2.0 is in use on your system, do the following:
1. View file C:\sqllib\java12\inuse.
2. The level of JDBC being used will be contained in the file.

Determining the level of JDBC in use for DB2 on UNIX


To see whether JDBC 1.x or 2.0 is in use on your system, do the following:
1. View the WebSphere Application Server admin.config and startupServer.sh
files.
2. In the file, check the administrative server classpath setting to ensure it
includes the DB2 java12 directory (for JDBC 2.0) or the DB2 java directory
(for JDBC 1.x).

2.1.6 Changing the version of JDBC that DB2 is using


This section describes how to change the version of the JDBC driver being used
in the DB2 environment.

The version of JDBC being used is significant in the functions supported by the
APIs it contains. In order to use WebSphere connection pooling you must be
using JDBC 2.0.

Enabling JDBC 2.0 with DB2 on Windows NT


To enable the use of JDBC 2.0 on Windows NT systems:
1. Stop all Java applications, and stop DB2 using the db2stop command.
2. Run the following batch file:
C:\SQLLIB\java12\usejdbc2.bat
(In some cases, the file is named jdbc20.exe.)
3. Stop WebSphere Application Server (if it is running) and start it again.

Enabling JDBC 1.0 with DB2 on Windows NT


To reverse the changes and return to a JDBC 1.x driver with JDK 1.1.x settings,
run the batch file as follows:
1. Stop all DB2 services.
2. Stop the IBM WebSphere Application Server administrative service.
3. Stop any other processes that use the db2java.zip file. (Note: If the JVIEW
process is active, you must use the Task Manager utility to stop it.)
4. Run the batch file:

Chapter 2. Java enablement 13


C:\sqllib\java12\usejdbc1.bat
5. Start the DB2 services.

Enabling JDBC 2.0 with DB2 on UNIX


To enable JDBC 2.0 use with DB2 on UNIX systems:

1. Ensure that DB2 is stopped.

2. As the DB2 instance owner run the following script:


sqllib/java12/usejdbc2

Figure 2-2 illustrates how the JDBC applet driver, also known as the net driver,
works. The driver consists of a JDBC client and a JDBC server. The JDBC server
process is db2jd.

The JDBC client driver is loaded on the Web browser along with the applet.
When the applet requests a connection to the DB2 database, the client opens a
TCP/IP socket to the JDBC server on the machine where the Web server is
running.

After a connection is established, the client sends each of the subsequent


database access requests from the applet to the JDBC server the TCP/IP
connection.

The JDBC server then makes corresponding CLI (ODBC) calls to perform the
task. Upon completion, the JDBC server sends the results back to the client
through the connection.

SQLJ applets add the SQLJ client driver on top of the JDBC client driver. Apart
from this added layer SQLJ client/server dialogues work the same way.

14 DB2 UDB e-business Guide


Web Browser Web Server Host

SQLJ
HTTPd
Applet

SQLJ
JDBC Server
Run-Time Classes Local DB2
Database
CLI

HTTP

Java/
JDBC TCP/IP
JDBC
Client Socket
Applet

Remote DB2
Database

Figure 2-2 DB2 Java applet implementation

2.1.7 DB2 and JDBC hints and tips


This section contains some miscellaneous hints and tips about using JDBC in the
DB2 environment.

Mapping JDBC isolation levels to DB2 isolation levels


The mappings for JDBC transaction isolation levels to DB2 isolation levels are
as follows:
򐂰 Connection.TRANSACTION_READ_UNCOMMITED = Uncommitted Read
򐂰 Connection.TRANSACTION_READ_COMMITTED = Cursor Stability
򐂰 Connection.TRANSACTION_REPEATABLE_READ = Read Stability
򐂰 Connection.TRANSACTION_SERIALIZABLE = Repeatable Read
򐂰 Connection.TRANSACTION_NONE = Not supported on DB2 UDB

FixPak levels
It is essential that the db2java.zip file used by the Java applet be at the same
FixPak level as the JDBC applet server. Under normal circumstances,
db2java.zip is loaded from the Web Server where the JDBC applet server is
running. This ensures a match. If, however, your configuration has the Java
applet loading db2java.zip from a different location, a mismatch can occur.

Chapter 2. Java enablement 15


Matching FixPak levels between the two files is strictly enforced at
connection time. If a mismatch is detected, the connection is rejected, and the
client receives one of the following exceptions:
򐂰 If db2java.zip is at DB2 Version 7 FixPak 2 or later:
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0621E
Unsupported JDBC server configuration.
򐂰 If db2java.zip is prior to FixPak 2:
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver]CLI0601E Invalid
statement handle or statement is closed. SQLSTATE=S1000

If a mismatch occurs, the JDBC applet server logs one of the following messages
in the jdbcerr.log file:
򐂰 If the JDBC applet server is at DB2 Version 7 FixPak 2 or later:
jdbcFSQLConnect: JDBC Applet Server and client (db2java.zip)
versions do not match. Unable to proceed with connection., einfo=
-111
򐂰 If the JDBC applet server is prior to FixPak 2:
jdbcServiceConnection(): Invalid Request Received., einfo= 0

2.2 Overview of DB2’s Java enablement


This section gives an overview of DB2’s Java enablement. Subsequent sections
in the chapter then expand on the detail of DB2’s Java enablement and the
considerations surrounding this environment.

The term Java enablement is used to encompass the interfaces that Java uses to
communicate with DB2 databases, the components within the DB2 product that
support Java development and the components that are configured to support
the runtime environment.

DB2’s Java enablement has three independent components:


򐂰 Support for client applications and applets written in Java using JDBC to
access DB2 (See 2.1, “JDBC support” on page 6 for more details)
򐂰 Precompile and binding support for client applications and applets written in
Java using SQLJ access to DB2 (See 2.3, “SQLJ” on page 21 for more
details)
򐂰 Support for Java UDFs and stored procedures on the server (See 2.4,
“Accessing stored procedures and UDFs using Java” on page 25 for more
details)

16 DB2 UDB e-business Guide


Figure 2-3 illustrates how a DB2 JDBC application works. DB2 V8 Type 2/3/4
Drivers are not in Figure 2-3.

SQLJ applications use this JDBC support, and in addition require the SQLJ
run-time classes to authenticate and execute any SQL packages that were
bound to the database at precompiling and binding stage.

The third component of DB2 Java support, stored procedures and UDF’s reside
on the DB2 server. These stored procedures and UDF’s can be called by both
client and server side applications using the Type 2 and Type 3 JDBC drivers, as
well as non-Java applications.

SQLJ
Application

SQLJ
Run-Time Classes

Remote
Database

Java
JDBC DB2 Client
Application

Figure 2-3 DB2’s Java application implementation

2.2.1 Setting the environment


This section describes the steps required to setup a Java environment for both
an AIX and Windows platform.

AIX
Here are the steps to install and configure a Java environment on AIX.

Chapter 2. Java enablement 17


Install
To build Java applications on AIX with DB2 JDBC support, you need to install and
configure one of the following on your machine:
򐂰 The Java Development Kit (JDK) Version 1.1.8 and Java Runtime
environment (JRE) version 1.1.8 for AIX from IBM. These are both installed
with DB2 V7.2.
򐂰 The Java Development Kit (JDK) Version 1.2.2 and Java Runtime
environment (JRE) version 1.2.2 for AIX from IBM.

Configure JDBC driver


The version 1.22 JDBC driver is the default driver on all DB2 platforms. The
JDBC version 2.0 is included with DB2 version 7.2. This version 2.0 driver for
JDBC is required as a prerequisite of using WebSphere version 4.0.

To switch between using the JDBC version 1.22 driver and the JDBC version 2.0
driver see “Changing the version of JDBC that DB2 is using” on page 13.

Configure JDK Path


To run DB2 Java stored procedures or UDFs, you need to update the DB2
database manager configuration on the server to include the path where the JDK
is installed on the machine. Use this command:
db2 update dbm cfg using JDK11_PATH /home/db2inst1/jdk11
Where, /home/db2inst1/jdk11 is the path where the JDK is installed.

Configure CLASSPATH
In order to run JDBC and SQLJ programs on AIX with DB2 JDBC support,
commands to update the AIX Java environment are included in the database
manager files db2profile and db2cshrc.

When a DB2 instance is created, .profile and/or .cshrc are modified so that the
CLASSPATH includes:
򐂰 "." (current directory)
򐂰 the sqllib/java/db2java.zip file

In addition for SQLJ programs:


򐂰 For build, CLASSPATH is updated to include file sqllib/java/sqlj.zip
򐂰 For runtime, CLASSPATH is updated to include file sqllib/java/runtime.zip.

Windows 32-bit operating system


Here are the steps to install and configure a Java environment on Windows.

18 DB2 UDB e-business Guide


Install
To build Java applications on the Windows 32-bit platform with DB2 JDBC
support, you need to install and configure one of the following on your machine:
򐂰 The Java Development Kit (JDK) Version 1.1.8 and Java Runtime
environment (JRE) version 1.1.8 for Win32 from IBM. These are both installed
with DB2 V7.2.
򐂰 The Java Development Kit (JDK) Version 1.2.2 and Java Runtime
environment (JRE) version 1.2.2 for Win32 from Sun
򐂰 Microsoft Software Developer’s Kit for Java, version 3.1

Configure JDBC driver


The version 1.22 JDBC driver is the default driver on all DB2 platforms. The
JDBC version 2.0 is included with DB2 version 7.2. This Version 2.0 driver for
JDBC is required as a prerequisite of using WebSphere Version 4.0.

To switch between using the JDBC Version 1.22 driver and the JDBC version 2.0
driver see “Changing the version of JDBC that DB2 is using” on page 13.

Configure JDK Path


To run DB2 Java stored procedures or UDFs, you need to update the DB2
database manager configuration on the server to include the path where the JDK
is installed on the machine. Use this command:
db2 update dbm cfg using JDK11_PATH c:\jdk11
Where, c:\jdk11 is the path where the JDK is installed.

Configure CLASSPATH
In order to run JDBC and SQLJ programs on the Windows with DB2 JDBC
support, commands to update the Windows Java environment are automatically
updated when DB2 is installed.

When DB2 is installed CLASSPATH is updated to include:


򐂰 "." (the current directory)
򐂰 The %DB2PATH%\java\db2java.zip file

In addition for SQLJ programs:


򐂰 For build, CLASSPATH is updated to include file %DB2PATH%\java\sqlj.zip
򐂰 For runtime, CLASSPATH is updated to include file
%DB2PATH\java\runtime.zip

Chapter 2. Java enablement 19


Note: In order to specify which JDK to use for DB2 SQLJ, DB2 installation
adds the environment variable DB2JVIEW on Win32 operating systems. It
applies to all DB2 SQLJ commands (db2profc,db2profp,profdb,profp and
sqlj).

If the default setting of "DB2JVIEW=0" is used, or DB2JVIEW is not set, then


the Sun JDK will be used. If "DB2JVIEW=1" the Microsoft SDK for Java will be
used.

2.2.2 Java packages


To use the class libraries included with DB2 in your own applications, you must
include the appropriate import package statements at the top of your source files.

You can use the following packages in your Java applications:


򐂰 java.sql.*
This is the JDBC API included in your JDK. You must import this package in
every JDBC and SQLJ program.
򐂰 sqlj.runtime.*
SQLJ support included with every DB2 client. You must import this package in
every SQLJ program.
򐂰 sqlj.runtime.ref.*
SQLJ support included with every DB2 client. You must import this package in
every SQLJ program.

2.2.3 Java file extensions


This section describes the meanings of extensions on Java source files.

The following extensions exist:


򐂰 .java
These files are Java source files, which require no precompiling. You can
compile these files with the javac Java compiler included with your Java
development environment.
򐂰 .sqlj
These files are SQLJ source files, which require translation with the sqlj
translator. The translator creates:
– one or more .class bytecode files
– one .ser profile file per connection context

20 DB2 UDB e-business Guide


The corresponding output files have the following extensions:
򐂰 .class
JDBC and SQLJ bytecode compiled files.
򐂰 .ser
SQLJ serialized profile files. You create packages in the database for each
profile file with the db2profc utility.

2.2.4 SQL security in Java


When using JDBC to access a DB2 server, a program will execute SQL
statements with the privileges assigned to the userid who runs the program.

When using an SQLJ application to access a DB2 server, a program will execute
SQL statements with the privileges assigned to the userid who created the
database package.

2.3 SQLJ
This section gives an overview and detail about SQLJ support in the DB2
environment.

2.3.1 What is SQLJ?


SQLJ is a way to embed SQL in Java programs. SQLJ looks like standard Java
with a small number of localized extensions. The SQLJ translator replaces
embedded SQL with calls to JDBC, the standard Java application programming
interface to databases.

The SQLJ environment consists of a translator (written in Java) and a set of Java
classes that implement SQLJ’s runtime support (see Figure 2-3).

SQLJ is designed with specific goals in mind. The main goal is to provide simple
extensions to Java to allow rapid development and easy maintenance of Java
applications that use embedded SQL to interact with databases.

Note: An application written using SQLJ uses only static SQL.

2.3.2 DB2 SQLJ support and restrictions


DB2 SQLJ support is provided by the DB2 Application Development Client.

Chapter 2. Java enablement 21


Along with the JDBC support provided by the DB2 client, DB2 SQLJ support
allows you to create, build, and run embedded SQL for Java applications,
applets, stored procedures and user-defined functions (UDFs). These contain
static SQL and use embedded SQL statements that are bound to a DB2
database.

The SQLJ support provided by the DB2 Application Development Client includes:
򐂰 The SQLJ translator, SQLJ, which replaces embedded SQL statements in
the SQLJ program with Java source statements and generates a serialized
profile containing information about the SQL operations found in the SQLJ
program.
The SQLJ translator uses the sqllib/java/sqlj.zip file.
򐂰 The SQLJ run-time classes, available in sqllib/java/runtime.zip.
򐂰 The DB2 SQLJ profile customizer, db2profc, which precompiles the SQL
statements stored in the generated profile and generates a package in the
DB2 database.
򐂰 The DB2 SQLJ profile printer, db2profp, which prints the contents of a DB2
customized profile in plain text.
򐂰 The SQLJ profile auditor installer, profdb, which installs (or un-installs)
debugging class-auditors into an existing set of binary profiles. Once
installed, all RTStatement and RTResultSet calls made during application run
time are logged to a file (or standard output), which can then be inspected to
verify expected behavior and trace errors. Note that only those calls made to
the underlying RTStatement and RTResultSet call interface at run time are
audited.
򐂰 The SQLJ profile conversion tool, profconv, which converts a serialized
profile instance to class bytecode format. Some browsers do not yet have
support for loading a serialized object from a resource file associated with the
applet. As a work-around, you need to run this utility to perform the
conversion.

For more information on the db2profc and db2profp commands, refer to the DB2
UDB Application Development Guide.

For more information on the SQLJ run-time classes, refer to the DB2 Java Web
site at http://www-4.ibm.com/software/data/db2/java/

2.3.3 Calling stored procedures and functions within SQLJ


Databases may contain stored procedures, user-defined functions, and
user-defined methods.

22 DB2 UDB e-business Guide


Stored procedures, user-defined functions, and user-defined methods are
named schema objects that execute in the database. For more details on stored
procedures see “Accessing stored procedures and UDFs using Java” on page 25

An SQLJ executable clause appearing as a Java statement may call a stored


procedure by means of a CALL statement (Example 2-3).
Example 2-3 Calling a stored procedure from SQLJ

#sql { CALL SOME_PROC(:INOUT myarg) };

Stored procedures may have IN, OUT, or INOUT parameters. In Example 2-3,
the value of host variable myarg is changed by the execution of that clause.

An SQLJ executable clause may call a function by means of the SQL VALUES
construct.

For example, assume a function F that returns an integer. The following example
(Example 2-4) illustrates a call to that function that then assigns its result to Java
local variable.
Example 2-4 Calling a function from SQLJ
x:
{
int x;
#sql x = { VALUES( F(34) ) };
}

2.3.4 Compiling and running SQLJ applications


To run an SQLJ program with program name MyClass, do the following:
1. Translate the Java source code with embedded SQL to generate the Java
source code MyClass.java and profiles MyClass_SJProfile0.ser,
MyClass_SJProfile1.ser, ... (one profile for each connection context):
sqlj MyClass.sqlj
When you use the SQLJ translator without specifying an sqlj.properties file,
the translator uses the following values:
– sqlj.url=jdbc:db2:sample
– sqlj.driver=COM.ibm.db2.jdbc.app.DB2Driver
– sqlj.online=sqlj.semantics.JdbcChecker
– sqlj.offline=sqlj.semantics.OfflineChecker

Chapter 2. Java enablement 23


If you do specify an sqlj.properties file, make sure the following options are
set:
– sqlj.url=jdbc:db2:<dbname>
– sqlj.driver=COM.ibm.db2.jdbc.app.DB2Driver
– sqlj.online=sqlj.semantics.JdbcChecker
– sqlj.offline=sqlj.semantics.OfflineChecker
Where, <dbname> is the name of the database.
You can also specify these options on the command line. For example, to
specify the database mydata when translating MyClass, you can issue the
following command:
sqlj -url=jdbc:db2:mydata MyClass.sqlj

Note: the SQLJ translator automatically compiles the translated source


code into class files, unless you explicitly turn off the compile option with
the -compile=false clause

2. Install DB2 SQLJ Customizers on generated profiles and create the DB2
packages in the DB2 database dbname:
db2profc -user=user-name -password=user-password
-url=jdbc:db2:dbname -prepoptions="bindfile using MyClass0.bnd
package using MyClass0" MyClass_SJProfile0.ser
db2profc -user=user-name -password=user-password
-url=jdbc:db2:dbname -prepoptions="bindfile using MyClass1.bnd
package using MyClass1" MyClass_SJProfile1.ser
3. Execute the SQLJ program:
java MyClass

The translator generates the SQL syntax for the database for which the SQLJ
profile is customized. For example:
i = { VALUES ( F(:x) ) };

This is translated by the SQLJ translator and stored as this in the generated
profile:
? = VALUES (F (?))

When connecting to a DB2 Universal Database database, DB2 will customize the
VALUE statement into:
VALUES(F(?)) INTO ?

24 DB2 UDB e-business Guide


Random documents with unrelated
content Scribd suggests to you:
+ – Outlook. 84: 428. O. 20, ’06. 430w.

Henderson, T. F. Mary, Queen of Scots: her environment and


tragedy. *$6 Scribner.
A biography satisfactory for students because of its wealth of
footnotes and references. “To sum up, the presentation of Queen
Mary ... is good and true to nature for the period in which she can
be observed in freedom, while she displayed to the world her great
and royal heart, facing her enemies in the field of battle, meeting
diplomatists in the council chamber, and discharging with grace
and gaiety the duties of hostess, or the functions of a queen, and
Mr. Henderson can make allowances for the strong temptations
which led to her fall. But in her long and cruel confinement he
loses touch with her. Without adequate conception of her rights, or
of the part which as a queen and a Catholic she should have played,
he considers her now as an actress, a devote, a mischief-maker. But
her conduct at her trial and execution again appeals to him and he
concludes with a fitting testimony to her great qualities.” (Acad.)

“Mr. Henderson’s volume is at least the fourth separate


biography of her which has appeared during this year alone. Of all
these lives Mr. Henderson’s is without doubt the best and most
thorough. His advantages over his rivals are many.” J. H. Pollen.

+ + – Acad. 69: 1351. D. 30, ’05. 1530w.


“His book is both a narrative biography and a critical study. The
value of the book lies chiefly in its clear presentation of general
conditions underlying the crises of Mary’s career and particularly
of the influence of foreign affairs upon their shaping and
development.” O. H. Richardson.

+ + Am. Hist. R. 11: 890. Jl. ’06. 860w.


“Some readers will be inclined to question not only the
soundness of many of Mr. Henderson’s criticisms, but also his
presentation of some of the facts. The book is vigorously written
and displays much critical acumen; but some of the phrases are
rather inelegant, and one or two savor of slang.”

+ – Ath. 1906, 1: 319. Mr. 17. 2030w.


“It is a pity that several mistakes have been allowed to creep into
the text, and that, in giving the date of the month, in nearly every
instance that date of the year has been omitted; also that the
author has permitted himself the use of so many unusual words.”

+ – Critic. 48: 472. My. ’06. 400w.


“He has brought together for the first time many facts that were
formerly to be sought only in scattered and more or less
inaccessible books or magazine articles, and he has added not a
little entirely new matter, important to a proper understanding of
the life of Mary Stuart and of those around her.” Lawrence J.
Burpee.

+ – Dial. 41: 63. Ag. 1, ’06. 390w.


“His survey is thorough, extensive and precise, missing scarcely
a detail of the stormy and adventurous career.”

+ + Lit. D. 32: 917. Je. 16, ’06. 960w.


“Though we differ widely from Mr. Henderson on many points,
his book is a valuable contribution to the controversy, and it will be
indispensable to the student. The general reader will find it fresh
and clear and well-informed. We feel bound to add that it is to a
considerable extent spoiled by Mr. Henderson’s irritating habit of
correcting his predecessors on points of detail. Sometimes he is
right, but more often it seems to us, there is as much evidence for
their view as for his.”

+ + – Lond. Times. 4: 449. D. 15, ’05. 830w.


“His book not only claims to be free from prepossessions, but
succeeds much better than most works on Mary Stuart in
preserving the mood of objectivity.”

+ Nation. 82: 409. My. 17, ’06. 580w.


“Mr. Henderson may have Mary’s history at his fingers’ ends ...
but he has not succeeded in telling what he knows convincingly, or
with clearness or fullness. Mrs. MacCunn’s biography is not only
far more interesting, but it is fuller.”

– N. Y. Times. 11: 159. Mr. 17, ’06. 430w.


“His is a book for advanced students, and these will find it richly
informative.” H. Addington Bruce.

+ + – Outlook. 84: 279. S. 29, ’06. 2920w.


“We have mentioned points susceptible of improvement in the
book, but it will be very welcome to the relatively large public
which studies the history of the unhappy queen.”

+ Spec. 95: sup. 899. D. 2, ’05. 1780w.

Henderson, William James. Art of the singer; practical hints


about vocal technics and style. **$1.25. Scribner.
The results of twenty-five years of study are summed up for the
teacher, the student and the lover of singing. “Probably the best
thing in Mr. Henderson’s book, the ‘Art of the singer,’ is his
defence of that art. In reply to the declaration of an acquaintance
that singing is an artificial achievement, he says: ‘The truth is that
while speaking is nature, singing is nothing more than nature
under high cultivation.’” (Nation.)

“A real acquisition to the library.”

+ + Bookm. 24: 271. N. ’06. 560w.


“While the book is to some extent technical, it is written in a
clear, comprehensive style and can be enjoyed by the mere lover of
singing.”

+ Lit. D. 33: 514. O. 13, ’06. 230w.


+ + Nation. 83: 291. O. 4, ’06. 630w.
“Mr. Henderson’s book is a most valuable and useful one. It
makes for the preservation and integrity of something that cannot
possibly be spared in the musical world.” Richard Aldrich.

+ + N. Y. Times. 11: 666. O. 13, ’06. 1080w.


+ R. of Rs. 34: 512. O. ’06. 60w.

Henry, Arthur. Lodgings in town. †$1.50. Barnes.

+ Critic. 48: 95. Ja. ’06. 140w.


“The intimate, straightforward and lively style in which Mr.
Henry writes, and his large and convincing optimism, make a
strong appeal to the reader’s sympathy.”

+ Dial. 40: 19. Ja. 1, ’06. 170w.

Henry, Arthur. Unwritten law. †$1.50. Barnes.


“It is a truer reproduction of contemporaneous cosmopolitan
existence than are most historical essays that claim to represent
things as they are, and being instinct with the higher realism ... the
work holds the interest of the reader from cover to cover.”

+ + Arena. 36: 573. N. ’06. 190w.


+ Sat. R. 100: 218. Ag. 12, ’05. 270w.

Henry, O., pseud. (Sydney Porter). Four million. †$1. McClure.


“In the four million people of New York city their daily living and
working and playing, Mr. Henry has found the material for
comedy, and tragedy, for laughter and tears. With a few deft
touches he weaves the fabric of romance in East side tenements,
Wall street brokers’ offices or along Fifth avenue. His sketches—
they are hardly stories—are remarkable for their terseness,
sympathy and humor, and for their deep insight into the inner life
of the great city.”—Pub. Opin.
“These sketches of New York life are among the best things of the
kind put forth in many a day.”

+ + Critic. 49: 93. Jl. ’06. 80w.


+ Ind. 61: 161. Jl. 19, ’06. 120w.
“The work is not even, of course, and some of it is not up to the
mark—but on the whole it expresses the spirit of New York
wonderfully. And it is clever and entertaining always.”

+ N. Y. Times. 11: 290. My. 5, ’06. 640w.


+ N. Y. Times. 11: 383. Je. 16, ’06. 220w.
“Little stories, each with its individual point, and all pervaded
with genuine fun and here and there a touch of sentiment or
pathos.”

+ Outlook. 83: 42. My. 3, ’06. 120w.


“His work is a living proof of the oft-repeated statement that
literature depends for its value not on the quality of the material
but on the eye of the beholder.”

+ Pub. Opin. 40: 604. My. 12, ’06. 120w.

Henshaw, Julia W. Mountain wild flowers of America: a simple


and popular guide to the names and descriptions of the flowers
that bloom above the clouds. *$2. Ginn.
Three hundred plants which the wanderer in mountain regions
may meet with at any turning are introduced to the reader of this
volume by both their popular and scientific names, while one
hundred of them are further identified by means of full-page
pictures reproduced from photographs taken by the author. The
flowers are classified according to color, an explanation of all
botanical terms used is given, and there is one index to the
scientific names and another to the English.
“Among the best of the numerous popular works on nature
issued during recent years.”

+ + Bookm. 24: 73. S. ’06. 110w.


+ Dial. 41: 73. Ag. 1, ’06. 60w.
“Even one ignorant of botany will be able to make use of the
book.”

+ Ind. 60: 1371. Je. 7, ’06. 120w.


“Is certain to stimulate as well as delight all tourists to the
wonderland of our great common Northwest.”

+ Nation. 83: 108. Ag. 2, ’06. 540w.


“An interesting and practical volume to the unenlightened.”
Helen R. Albee.

+ N. Y. Times. 11: 567. S. 15, ’06. 330w.

Herbert, George. English works, newly arranged and annotated


and considered in relation to his life, by G. Herbert Palmer. 3v.
*$6. Houghton.
“The edition is an elaborate and worthy monument to the
gravely sweet and original genius.”

+ + Ath. 1906, 1: 415. Ap. 7. 1700w.


“He has done a work never attempted before, and it is so final in
its results that henceforth every student of Herbert must reckon
with it.” A. V. G. Allen.

+ + + Atlan. 97: 90. Ja. ’06. 8090w.


“Wide and intimate scholarship and a rare insight born of a
lifetime of close fellowship are met together in this work.” Frances
Duncan.

+ + – Critic. 49: 183. Ag. ’06. 1640w.


“Professor Palmer’s essays are terse, direct, and pithy, felicitous
in their combination of tireless scholarly research and infectious
enthusiasm.”

+ + + Dial. 40: 129. F. 16, ’06. 410w.


“He has run the risk of misleading the general reader by
imposing upon the arrangement an interpretation of the poet’s
character which is peculiarly his own, and unsustained by internal
or external evidence.”

+ + – Ind. 61: 1164. N. 15, ’06. 100w.


Lit. D. 32: 209. F. 10, ’06. 780w.
“Excellent as an annotator, the present editor does not appear to
us so happy as a biographer.”

+ + – Lond. Times. 4: 456. D. 22, ’05. 2050w.


“It is probably the most complete, and critically speaking, the
final edition of the English poet’s works.”

+ + R. of Rs. 33: 110. Ja. ’06. 190w.

Herrick, Albert Bledsoe. Practical electric railway hand-book.


2nd ed. rev. & corrected. *$3. McGraw pub.
The results of practical experiences along the lines of
improvement in the operation of electric railways have been
arranged here in convenient form for reference. “The material is
logically arranged in the following nine sections: General tables,
testing, track, power station, line car house, repair shop,
equipment and operation.”

“The second edition of this handbook ... is greatly improved in


many ways.” Henry H. Norris.

+ + Engin. N. 55: 673. Je. 14, ’06. 580w.


Herrick, Christine Terhune, ed. Lewis Carroll birthday book.
75c. Wessels.

+ Dial. 40: 98. F. 1, ’06. 50w.

Herrick, Robert. Memoirs of an American citizen. † $1.50.


Macmillan.
“The story is told in a clear, personal narrative which never
strays into a false key.” Mary Moss.

+ Atlan. 97: 43. Ja. ’06. 130w.


“It is in the life-like portraits of Carmichael and other business
men that he excels, and in the description of the purely business
side of life.”

+ Sat. R. 101: 308. Mr. 10, ’06. 100w.

Herrmann, Wilhelm. Communion of the Christian with God.


Authorized tr.; new cheaper ed. **$1.50. Putnam.
A translation of the last German edition issued in a more
convenient form than the first American issue and at a popular
price.

“It is assuredly one of the important doctrinal treatises of a


generation, and it is well that it is rendered into English from the
text which is likely to be the author’s final revision.”

+ + Ind. 61: 880. O. 11, ’06. 1050w.


“It is a book which has entered into the life of our time, and its
work has been in behalf of sincere piety and true devotion.”

+ + Nation. 83: 168. Ag. 23, ’06. 590w.


“We are glad to see so rational and so devout a book published in
a form which brings it within the reach of others than professional
students. For it is more than a book of theology; it is an exposition
and interpretation of religious experience.”

+ + Outlook. 84: 428. O. 20, ’06. 390w.

Herzfeld, Elsa G. Family monographs: the history of twenty-four


families living in the middle of the west side of New York city.
For sale by Brentano’s and Charity organization soc., N. Y.
Miss Herzfeld says, “The object of these studies is to throw light
on the family of the New York tenement-house dweller. The
majority of the families studied are fairly typical of the German and
Irish, foreign and native born, tenement-house population of New
York.” While not the most thriftless type they live from hand to
mouth. The work is based on wide sociological observation.

“Fragmentary as the study is, it is an authentic document by a


shrewd observer and interpreter of social motives.” C. R. H.

+ + Am. J. Soc. 11: 706. Mr. ’06. 50w.


“The monograph is valuable and will be very serviceable to
students of city life.”

+ + Ann. Am. Acad. 27: 236. Ja. ’06. 90w.


“The book is one that the general reader will enjoy; for interest
has not been sacrificed to scientific colorness, and humor and
pathos are alike to be found here.” E. A.

+ + J. Pol. Econ. 14: 255. Ap. ’06. 130w.


“It is not, in fact, a literary work in any sense, or a ‘book’ in any
but the most restricted sense. It is a tract.”

+ + – N. Y. Times. 10: 712. O. 21, ’05. 210w.

Hewitt, Randall H. Across the plains and over the divide: a mule
train journey from East to West in 1862, and incidents connected
therewith. $1.50. Broadway pub.
The untamed West of the Civil war days, with its primitive
grandeur and unrestraint is reproduced in these pages for the
benefit of the younger generation. The journey covers a zigzag
course from Illinois to Washington, over wild country, with no end
of perilous encounters.

Hewlett, Maurice. Works. Ed. de luxe. 11v. ea. *$3. Macmillan.

+ Pub. Opin. 40: 638. My. 19, ’06. 970w. (Review of v. 1–9.)

Hewlett, Maurice Henry. Fond adventures: tales of the youth of


the world. †$1.50. Harper.
“Here again he shows his virtuosity in creating a magic haze,
beyond which his mediaeval figures move upon their fate.” Mary
Moss.

+ Atlan. 97: 53. Ja. ’06. 340w.

Hewlett, Maurice. Fool errant. †$1.50. Macmillan.


“Can it be that Mr. Hewlett after all grows genial?” Mary Moss.

+ Atlan. 97: 54. Ja. ’06. 30w.

Heyward, Janie Screven. Wild roses. $1.25. Neale.


Some thirty verses, simple to a fault, upon homey subjects—with
a touch here and there of strong Southern feeling. The volume
opens with a poem on Confederate reunion 1899, and closes with
The Confederate private.

Heywood, William. Palio and Ponte. Methuen, London.


“For the present volume all those who love the history of sport or
of Italy will be grateful. It is as light as it is learned, while the
excellent illustrations and pleasant type and form give it an added
charm.” E. Armstrong.

+ + Eng. Hist. R. 21: 153. Ja. ’06. 1000w.

Hichens, Robert Smythe. Black spaniel and other stories. †$1.50.


Stokes.
“They have not the epigrammatic flash of his earlier books nor
the substantial impressiveness of his latest.”

– Critic. 48: 286. Mr. ’06. 130w.

Hichens, Robert Smythe. Call of the blood; il. by Orson Lowell.


†$1.50. Harper.
An Englishman ten years younger than his “ugly though
brilliantly clever and intellectual” bride finds, under the sunny
skies of Sicily whence they go for their honeymoon, that he cannot
resist the cry of youth and beauty. The strain of Sicilian blood in his
veins is responsible for his aptitude in dancing the tarantella and
for his yielding to the quick call of love—dishonourable tho it be,
and tragic tho it prove.

“It is a full-blooded stirring story—a work which, if Mr. Hichens


had not written ‘The garden of Allah,’ we might hail as the greatest
novel of passion in the century.”

+ + Acad. 71: 266. S. 15, ’06. 150w.


“Mr. Hichens at any rate is open to the accusation of taking a
long time to tell a simple story.”

+ – Ath. 1906, 2: 362. S. 29, 370w.


“Mr. Hichens envelops himself in rather artificial motives and
seems quite oblivious of the influences that must really move his
characters to act with consummate naturalness to an inevitable
end.” Duffield Osborne
+ – Bookm. 24: 377. D. ’06. 780w.
“So far as the matter of scene painting goes, ‘The call of the
blood’ recalls the splendid richness of colour in ‘The garden of
Allah’ while in all other respects it serves only to emphasize the
marked superiority of the earlier volume.” Frederic Taber Cooper.

+ – Bookm. 24: 386. D. ’06. 330w.


“Mr. Hichens, it seems, has committed the strategic crime of not
making his new novel even better than its predecessor. Yet ‘The call
of the blood’ is a good book, perhaps even a great book.”

+ + – Current Literature. 41: 699. D. ’06. 820w.


“There is not enough power in this story and too much decadent
fineness.”

– + Ind. 61: 1229. N. 22, ’06. 710w.


“The book is entertaining and well worth reading.”

+ Lit. D. 33: 727. N. 17, ’06. 210w.


“Some of the Sicilian descriptions are quite as remarkable as
anything Mr. Hichens has done.”

+ Lit. D. 33: 858. D. 8, ’06. 70w.


+ – Lond. Times. 5: 305. S. 7, ’06. 510w.
+ – Nation. 83: 396. N. 8, ’06. 450w.
“The story is written with much dramatic power and with fine
restraint as well. The chief fault of the novel, is that at times,
notably in the last hundred pages, the action drags.”

+ – N. Y. Times. 11: 719. N. 3, ’06. 690w.


N. Y. Times. 11: 796. D. 1, ’06. 170w.
“The latter part of the story is tragic and moves with some vigor
—but too late!”
– + Outlook. 84: 581. N. 3, ’06. 140w.
“The author’s style has an even carefulness. It has no compelling
illumination, no gift for happy phrase, and is never impregnated
with the sense of character; but it lends itself to the landscape
passages of which he is fond, and retains throughout a literary
finish.”

+ Sat. R. 102: 401. S. 29, ’06. 730w.


“Mr. Hichens’s style harmonises excellently with his subject. Its
colour is at times rather hectic, but in the main it seems to
heighten the effect of a remarkably interesting and dramatic study
of the survival of pagan and primitive instincts.”

+ Spec. 97: 404. S. 22, ’06. 810w.

Hichens, Robert. Garden of Allah. $1.50. Stokes.


“From the standpoint of the author, in so far as he has
vouchsafed to disclose it, the ending of the story is forced and
inartistic.” Duffield Osborne.

– Bookm. 24: 378. D. ’06. 760w.


Edinburgh R. 203: 79. Ja. ’06. 2260w.
Living Age. 248: 736. Mr. 24, ’06. 2260w. (Reprinted from
Edinburgh R.)

Higgins, Hubert. Humaniculture. **$1.20. Stokes.


“A phrase of the author’s states the subject matter of this book:
‘The problem has now shifted its ground from how to cure a man ...
in a hospital to the cure of a man in a sanitarium. The real problem
still remains; how to prevent a man in a home from acquiring
disease.’... It is now known that only through the exercise of the
faculty of mastication and insalivation can the stomach and
intestines perform their functions in a non-poison-producing
way.... The real significance of this act has only recently been
demonstrated, and by an American, Mr. Horace Fletcher. The first
half of Dr. Higgins’s book is devoted to analysis and eulogy of Mr.
Fletcher’s theories.”—Outlook.

“To do him justice there is more truth in his theories than in


some others with which a long-suffering public has been afflicted.”

+ Critic. 49: 95. Jl. ’06. 60w.


“Dr. Higgins is neither a ‘crank’ nor a faddist. While his book is,
unfortunately, diffuse in style and not clear in construction, it is
worth reading.”

+ Outlook. 83: 579. Jl. 7, ’06. 410w.

Higginson, Thomas Wentworth. Part of a man’s life. **$2.50.


Houghton.

+ + Ath. 1906, 1: 134. F. 3. 300w.


Reviewed by M. A. De Wolfe Howe.

+ + Atlan. 97: 115. Ja. ’06. 860w.


“It is pleasant to see, in regard to this intensely human part of a
man’s life, that he can still point a pen not greatly corroded by the
rust of days.”

+ + Ind. 59: 1341. D. 7, ’05. 670w.


“Has seldom written to better purpose than in this semi-
biographical volume of reminiscences and impressions.”

+ + Lit. D. 31: 1000. D. 30, ’05. 490w.


“This volume with its rich fund of story and observation,
garmented in graciousness and adorned with many interesting
portraits and autograph facsimiles, will win for its author an
increasing measure of esteem and affection.”

+ + Reader. 7: 338. F. ’06. 570w.


Higginson, Thomas Wentworth, and MacDonald, William.
History of the United States from 986 to 1905. $2. Harper.
“The revision and enlargement will tend to prolong its space of
public favor for another score of years.”

+ + Reader. 6: 724. N. ’05. 290w.

Hight, George Ainslie. Unity of will: studies of an irrationalist.


**$3. Dutton.
“Mr. Hight’s treatise is quite in line with the present trend of
philosophy. This, reversing the long-prevalent and still popular
conception of will as the instrument of reason, recognizes will as
the master and intellect as its servant, both in the individual and in
the universe.... By will is broadly meant the self-active principle
manifested in all loving, hating, seeking, shunning, striving.”—
Outlook.

Ath. 1906, 1: 731. Je. 16. 230w.


“The book was written throughout in an attractive and readable
style; to this is added the merit of brevity, unusual in philosophic
works of this sort. At the end a series of ‘First principles’ sums up
in concise form the main views of the author, which, although, as
has been pointed out, they do not always fit in with those of one
more used to a psychological and epistemological method of
approach, still are calculated to present to all much food for
profound and beneficial reflection.” Robert Morris Ogden.

+ – J. Philos. 3: 715. D. 20, ’06. 1340w.


“His argument is carried forward with a directness, a logic, a
careful avoidance of unnecessary technicalities that are admirable.”

+ N. Y. Times. 11: 499. Ag. 11, ’06. 1760w.


“Whatever be its defects, Mr. Hight’s line of thought is soundly
practical, and its effect is tonic and uplifting.”
+ + – Outlook. 83: 580. Jl. 7, ’06. 420w.

Higginbotham, Harlow Niles. Making of a merchant. $1.50.


Forbes.
A thoroly practical handling of a subject most vital to young men
entering upon a business career. Mr. Higinbotham writes from
experience and discusses the foundation, advancement, qualities
that make a merchant, details that spell success, buying
merchandise, treatment of employers, the department store and its
management, and the extension of credit in its various phases.

+ Lit. D. 33: 768. N. 24, ’06. 200w.

Hildreth, Richard. Japan as it was and is: a handbook of old


Japan: a reprint, ed. and rev., with notes and additions by Ernest
W. Clement; introd. by William Elliot Griffis. *$3. McClurg.
The material of the 1861 edition of Hildreth’s “Japan” has been
revised and reprinted with copious illustrations and adequate
editorial matter. The work is no less important now than when it
first appeared in 1855, for the fact that it is a compilation from all
the important European writings on Old Japan establishes its
permanent value. In the revision, the author has harmonized the
spelling of Japanese words with the modern system of
Romanization, and has added such other notes and explanations as
might be necessary.

Dial. 41: 400. D. 1, ’06. 80w.

Hildt, John C. Early diplomatic negotiations of the United States


with Russia. Johns Hopkins press.
This volume of the “Johns Hopkins university studies in
historical and political science” forms an introductory study of the
relations of the United States with Russia, and narrates “the
history of the rise and progress of the early diplomatic relations of
the American government to that country and the steps by which
the negotiations were carried forward.” The missions of Dana,
Adams, and Pinckney, the question of consular immunity, Spanish-
American affairs, and the treaty of 1824 all receive careful
consideration.

“He gives a careful and clear, but pedestrian account, based on


the printed American materials and, after 1816, on an extensive use
of the manuscript materials in the archives of the Department of
state.”

+ Am. Hist. R. 12: 177. O. ’06. 190w.

Hill, David Jayne. History of diplomacy in the international


development of Europe, v. 1. **$5. Longmans.
“But what is much more striking is the industry, the insight, and
the thoroughness with which, on the whole, even in its vast
introductory field, he has acquainted himself, as to all points
cardinal to his theme, with the best and the latest of the teeming
literature of his subject. As for petty slips ... they are exceptionally
few.” George L. Burr.

+ + – Am. Hist. R. 11: 358. Ja. ’06. 1150w. (Review of v. 1.)


“The misfortune of the volume is, in short, that it lacks a true
perspective. If, however, the work be considered as merely a new
general history, on the international side, it has many excellent
features, being very well written, clear, accurate and even
entertaining, while the source references at the end of each
chapter, the lists of treaties, the maps, and a comprehensive index
render it a valuable reference work.” E. D. Adams.

+ + – Ann. Am. Acad. 27: 248. Ja. ’06. 570w. (Review of v. 1.)
“On the whole the book has the qualities of a competent
American work, being well written, but a little dull, very dependent
on European scholarship, and lacking in freshness.”
+ + – Ath. 1905, 2: 334. S. 9. 310w. (Review of v. 1.)
“It is valuable, however, for bringing into one view the larger
facts of the period treated, and emphasizing their influence upon
the growth of national states.” David Y. Thomas.

+ Dial. 40: 9. Ja. 1, ’06. 1680w. (Review of v. 1.)


“A word of praise is due to the bibliographies which are
appended to each chapter, and to the regnal tables, maps, and
index.” H. W. C. Davis.

+ + – Eng. Hist. R. 21: 344. Ap. ’06. 920w. (Review of v. 1.)

Hill, Frederick Trevor. Lincoln the lawyer. **$2. Century.


The author believes that in the vast amount of material on the
life of Abraham Lincoln too little can be found which sums up the
great President’s legal career. So this sketch starts with Lincoln’s
mythical birthright to the law, locates the real source of his
professional aspirations, follows him through his workshop
apprenticeship to his admission to the bar, and on, step by step, to
the presidency. The whole discussion particularizes the stages of
legal growth that is usually assumed in the presentation of Lincoln
the statesman.

“Is, on the whole, something of a contribution to the Lincolniana


already so vast.”

+ Ind. 61: 1170. N. 15, ’06. 20w.


“Mr. Hill has made a distinct contribution to Lincoln biography.
By this we mean a contribution of original material, not a new
interpretation, or new presentation, of material already in
existence.”

+ + Lit. D. 33: 646. N. 3, ’06. 70w.


Lit. D. 33: 855. D. 8, ’06. 60w.
“No layman—not to mention the lawyer—can fail to be interested
by evidence so carefully sifted and a story so well told. Indeed,
many parts of the book have almost the value of original
documents.”

+ Nation. 83: 459. N. 29, ’06. 260w.


+ N. Y. Times. 11: 841. D. 1, ’06. 520w.
“Mr. Hill writes for laymen, in a clear, simple, and non-
professional style, and has made an interesting as well as valuable
volume. He has done his work so well that we regret that he has not
done it better.”

+ – Outlook. 84: 628. N. 10, ’06. 480w.


“A real contribution to history. Mr. Hill’s researches have
brought to light a vast amount of interesting data concerning the
bench and bar of Illinois in Lincoln’s time.”

+ + R. of Rs. 34: 639. N. ’06. 180w.

Hill, G. Francis. Historical Greek coins. **$2.50. Macmillan.


A sidelight on Greek history. It is “not a popular work in the
broad sense of the term. It is rather a handbook to the most
interesting items in the British museum.... The material in the
introduction is naturally encyclopedic.... It presupposes a general
knowledge of numismatics on the part of the reader, which is only
to be gathered from the present volume by careful perusal. The
coins are taken up one by one—in many cases most excellently
reproduced in half-tone—and studied from the point of view of
their material, pictures, and inscriptions, their historical period
being described in such a way as to bring its customs and manners
vividly before the reader.” (N. Y. Times.)

“The selection of documents can be criticised, of course, both for


its inclusions and its omissions. But it is quite sufficiently
representative to serve as an introduction to the use of numismatic
evidence in historical study, which we take to be the main object of
the book.” D. G. Hogarth.

+ + – Eng. Hist. R. 21: 547. Jl. ’06. 700w.


“The author is the most competent that could be found in this
country. If we think that, written on a somewhat different plan, it
might have been more valuable, we hasten to admit that its actual
value is very great. It will widen the outlook of every historical
student who consults it.”

+ + – Lond. Times. 5: 250. Jl. 13, ’06. 880w.


“Here and there in the volume we find passages containing
information which long ago should have been employed as
footnotes to history.”

+ + N. Y. Times. 11: 606. S. 29, ’06. 520w.


“The reader will find most of the great problems of Greek
numismatics adequately discussed, with a laudable terseness and
much sound judgment.”

+ + Sat. R. 102: 400. S. 29. ’06. 810w.


“Mr. Hill has a way of making his learning attractive.”

+ + Spec. 96: 1044. Je. 30, ’06. 280w.

Hill, George Francis. Pisanello. *$2. Scribner.


“Mr. Hill paints his portrait and interprets his art with a skill
worthy of the theme.” Royal Cortissoz.

+ Atlan. 97: 281. F. ’06. 190w.


“Pisanello, the painter and the medalist, together with his
brother workers upon the little reliefs, have been comprehended
here in a distinct and lucid manner.”

+ Critic. 48: 89. Ja. ’06. 50w.


Hill, Headon, pseud. (Francis Edward Grainger.) One who
saw. $1.50. Victoria press (Stitt pub. co.).
There is a mystery in this story which “hovers around a haunted
tower. The deus ex machina is a small boy with a cockney accent, a
bona fide burglar (with a jimmy that he calls a James,) for a father,
and a remarkable facility for climbing up precipices and other
apparently impossible places, a facility, by the bye, which stands
everybody in the book in good stead before the end is reached. Of
course, the hero does nothing but pose and bluster. Of course, the
heroine looks beautiful and suffers patiently, like the ‘hangel’ that
she is to the small Tommy. And, of course, the small Tommy in
question is, as anyone with half an imagination could guess, ‘The
one who saw.’” (N. Y. Times.)

Ath. 1905, 1: 395. Ap. 1. 300w.


N. Y. Times. 11: 107. F. 17, ’06. 230w.

Hill, Janet McKenzie (Mrs. Benjamin M. Hill). Up-to-date


waitress. **$1.50. Little.
Mrs. Hill, editor of the Boston cooking-school magazine, says
“This book is intended as a guide to what may be called good,
perhaps ideal, service for waitresses under all circumstances, and
not as a set of hard and fast rules from which there is no appeal.” It
gives complete information on the care of the dining room, the
arrangement of the table, the serving of food, and the preparing of
certain dishes.

“It should be in every household.”

+ Ind. 61: 155. Jl. 19, ’06. 60w.


“It is a most useful and interesting volume. The mistress of the
house cannot afford to be without it.”

+ + N. Y. Times. 11: 318. My. 19. ’06. 220w.


+ Outlook. 83: 531. Je. 30, ’06. 140w.
Hill, Mabel. Lessons for junior citizens. 50c. Ginn.
A little text-book in civics which aims to arouse children to take
an intelligent interest in the activities of their local government.
Each chapter contains a short story concerning some municipal or
political function, such as, the police department, board of health,
fire department, school system, park commission, immigration,
and naturalization, etc. Each chapter is followed by a series of
questions which fit the book for school use.

Hill, Sarah C. Cook book for nurses. *75c. Whitcomb & B.


A collection of recipes in a condensed form which will prove
valuable to nurses and all those who wish to prepare proper food
for the sick. Various rules for fluid diet, soft or convalescent diet,
special diets and formulae for infant feeding are given while blank
leaves are left for additional recipes.

Hind, Charles Lewis. Education of the artist. $2.50. Macmillan.


“How Claude Williams Shaw was educated in art is set forth in
Mr. Hind’s volume. It tells how, at the age of thirty-three, certain
persistent glimmerings of a suspicion that life is a larger tapestry
than the pattern woven by the author of ‘Self-help’ broke into
flame; how that flame was fanned by an artist who crossed his
path; how casting about for a way to express his temperament, he
decided upon painting; how he studied art in Cornwall and in the
Paris studios; how he traveled through Italy, Austria, Germany,
and Belgium, studying the pictures of the world in pursuit of his art
education; and how in the end of the true awakening of his
temperament began, and he discovered that his education was but
beginning.”

“The public which delights in his writing will be just the public
that can only pretend to admire the artists of his choice.”

+ – Ath. 1906, 2: 372. S. 29. 1560w.


“Is the record of the impressions of an alert, sensitive, and
cultivated, if rather capricious, taste. We shall find no guide-book
information, nor quotations from other people; the judgments are
independent and personal.”

+ – Lond. Times. 5: 336. S. 28, ’06. 760w.


“These make pleasant, if not especially profitable reading.”

+ Nation. 83: 446. N. 22, ’06. 330w.


“The book may not interest the serious student; to the beginner
it should be a kind of Bodley book in art.”

+ – Outlook. 84: 706. N. 24, ’06. 100w.

Hinkson, Mrs. Katharine Tynan (Mrs. H. A. Hinkson). Dick


Pentreath. †$1.25. McClurg.
Dick Pentreath, plain gentleman, pursues his way among the
commonplaces of life buoyantly enough until on the eve of his
marriage a foolish drinking bout changes the course of true love.
Dorothea scorns him, and in his anger he rushes headlong into a
union with an ill-bred woman who brings him shame and
humiliation. Had Dick but yielded even to the instinct of his dog
Sancho who estimated Susan unerringly, the mistake would have
been averted. His burden is lightened now and then by the kindly
encouragement of his sister confessor Lady Stella, and by the ready
devotion of faithful Sancho. The journey which “bleached Dick
Pentreath white” does finally end in lovers meeting.

“A story of more substance and a wider range of interest than we


remember in any of this author’s previous novels, and much better
written.”

+ Acad. 69: 1201. N. 18, ’05. 330w.


“The author can do better than this.”

– Ath. 1905, 2: 829. D. 16. 90w.


“Everything about the novel is slip-shod.”
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like