README
Pattern Development Kit Lite
Version 2.0
System Requirements
Pattern Development Kit Lite 2.0 runs on Windows NT 4.0 with Service Pack 6A. Running on a stand alone machine we recommend that you have no less than 280Mb of memory and a Pentium II processor or higher.
Products Required
The following product levels were used to develop and test PDK Lite. There may well be cases where more recent releases, or different versions would work equally well. However, the following configuration is the only one officially supported:
Runtime:
- WebSphere AppServer Advanced Edition V3.5 for NT (including IBM HTTP Server V1.3.6.12 for NT)
- DB2 Universal Database UDB 6.1 with fixpack 4
Development:
- VisualAge Java Version 3.5 Enterprise Edition for Windows
- WebSphere Studio 3.5 Advanced Edition
Please note ! This version of the PDK has been rigorously tested to the level of software indicated above. A full set of all the software required will soon be available to order - check the Patterns for e-Business Web site regularly for news on this. In the meantime, if you would like to run the PDK now, you will find the latest trial downloads by following these links:
Information Required
Make sure you have the following information available when running the start_Topology_1.cmd:
- Machine name (To find your machine name, simply type "hostname" from a command prompt. Your machine name will be echoed to the screen.)
- PDK Lite path (e.g. C:\PDK_Lite_2)
- WebSphere install directory (e.g. C:\WebSphere\AppServer)
- IBM HTTP Server install directory (e.g. C:\IBM HTTP Server)
How to Run PDK Lite 2.0
To install and configure the Pattern Development Kit Lite:
- Extract the PDK files to your hard drive (e.g.C:\PDK_Lite_2)
- Check the WS Admin Server Service is running; if it isn't start it before continuing
- Run the command file start_Topology_1.cmd in the PDK directory to which you have extracted the PDK files
You will be prompted to provide information such as your machine's hostname, and the location of the requisite products. For simplicity, when configuring IBM HTTP Server, you are presented only with a subset of the http.conf configuration file, called changes.conf. This is merged with the rest of the file afterwards and the entire http.conf file is displayed.
Tips & Warnings
- You MUST run the PDK Lite from the C: drive, as the WebSphere Studio project was designed to run from this drive.
- You MUST use the default installation directories for WebSphere, HTTP Server, and DB2, as these are referenced in the XML files used to configure the Web Application. However, if your products are installed to other directories, you can edit the paths as follows:
-
- In the file,
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\config\xml\sectionA\db2jdbcdriver.xml
Amend the following line to reflect the location of your DB2 driver,
<jdbc-zipfile-location>C:\SQLLIB\java\db2java.zip</jdbc-zipfile-location>
- In the file,
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\config\xml\sectionA\webapp.xml
Amend all occurrences of "C:\WebSphere\AppServer" to reflect your WebSphere AppServer installation directory.
- You MUST run the start_Topology_1.cmd script under the same userid you used to install DB2 or another ID with the appropriate administrative authority.
- You MUST start the WS Admin Service before running the start_Topology_1.cmd, as command scripts depend on this. You must also ensure that the DB2 and IBM HTTP Server services are started.
- When you are prompted to hit a key to continue, it is important that you do so, as the next script will not start until the previous one has completed.
- The NODENAME environment variable MUST be entered in lower case.
- It is assumed that your WebSphere node's name will be the same as your machine name (hostname).
- When entering product paths, DO NOT add in quotes, EVEN IF the path includes spaces.
- When editing configuration files, don't forget to SAVE and CLOSE the file to allow the command script to continue.
- When editing the changes.conf file, uncomment the LoadModule line as appropriate for the level of encryption suitable for your location. By default, you need not alter this at all.
- When starting the Default Server, it is vitally important that you wait for hard drive activity to stop before attempting to run the browser (see picture below). If you do not, you may not get the desired results.
- When you have finished reading this document, close this window to continue with the setup. To open again, double-click the README.html file in the PDK Lite directory.

Known Issues
- Failing to remove the JDBC driver in reset. If this happens, you can perform this step manually, via the Admin Console, as follows:
-
- Start the WebSphere Administrative Console from Start Menu -> Programs -> IBM WebSphere -> Application Server V3.5 -> Administrator's Console
- Expand the + next to "WebSphere Administrative Domain"
- Expand the + next to the node which has your hostname
- Select "Default Server" - if it is started, click the stop button on the toolbar (a small square) or use the right mouse button's context menu. Otherwise continue.
- Select DB2AppDriver. From the right mouse button's context menu, select "Remove" and confirm your decision at the prompt.
Finding the source code
You can find the PDK Lite Topology 1 source code under the PDK install directory U2BTop_1\TestDrive\coding\artifacts\.
Java Source
The Java packages containing the source code used by PDK Lite can be found off the servlets directory off the PDK Lite install directory, e.g.:
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\config\artifacts\sectionA\servlets
The Java source files can then be found in directory structures which map to their fully qualified package names. For example, the Java source file:
-
com.ibm.hursley.asg.ws.skeleton.command.Command.java
...would be located off the servlets directory, in the sub directory:
-
com\ibm\hursley\asg\ws\skeleton\command\
...in a file called Command.java
The same code is also included in a VisualAge for Java repository file called U2BTOP.dat, under the repository directory. , e.g.:
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\coding\artifacts\repository\U2BTOP.dat
To edit the code in VisualAge Java, import the .dat file into the VAJ workspace. A project called U2BTOP (User-to-Business Topology) will be added, with the packages used by the PDK Lite. To compile the classes, you will need to do the following:
- Import the U2BTOP Project into VAJ, adding it to the WorkSpace.
- File -> Quick Start -> select 'Features' in the left hand pane, then 'Add Feature' in the right hand pane. Click OK.
- In the 'Selection Required' dialog, select the following:
-
- IBM WebSphere Test Environment 3.5
- Click 'OK'. This will also add various other projects to your Workspace if not already there (e.g. Servlet API Classes 2.1) After the classes have been added, the 'All Problems' tab should not display any problems for the U2BTOP project.
You can now edit, compile and export the code. WebSphere Studio Project
A WebSphere Studio archive file containing the entire WebSphere Studio project can be found under the Studio Archive directory, e.g.:
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\coding\artifacts\Studio Archive\U2BTOP.war
This archive can imported in to the project of your choice in WebSphere Studio. In addition, the WebSphere Studio Project wao file (as well as all supporting files and directories) used in the construction of the skeleton web application can be found in a file called u2btop.wao, in the config\artifacts\ directory, e.g.:
-
C:\PDK_Lite_2\U2BTop_1\TestDrive\config\artifacts\u2btop.wao
Please note that due to the way directory information is stored in Studio's project files, the project will not open properly unless you install PDK Lite to the default directory of C:\PDK_Lite_2 .
Suggested reading
Learn more about Patterns for e-business at http://www.ibm.com/software/developer/web/patterns/
For a guide to working with both WebSphere Application Server and WebSphere Studio see:
http://www.ibm.com/software/webservers/studio/library.html
The following books are available from the IBM Redbooks site at http://www.redbooks.ibm.com/
 | Patterns for e-business: User-to-Business Patterns for Topology 1 and 2 using WebSphere Advanced Edition SG24-5864 |
| WebSphere Studio and VisualAge for Java Servlet and JSP Programming SG24-5755 |
| Servlet/JSP/EJB Design and Implementation Guide for IBM WebSphere Application Servers SG24-5754 |
| Connecting e-business to the Enterprise by Example SG24-5514 |