494 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
B.1 Setting up the Java sample application
The following procedure describes how to install the Java sample application in
WebSphere Studio Application Developer 5.1.1 and run the sample in one of the
test environment configurations. The procedure described here applies if you are
running WebSphere Studio Application Developer 5.1.1 on Microsoft Windows.
To set up the application in WebSphere Studio Application Developer 5.1.1,
perform the following steps:
1. Copy external files.
a. Locate the EAR file BTTJavaSample.ear from
<toolkit_root>\samples\JavaSampleApplication\StandAlone\BTTJavaSam
ple.ear
b. Extract the BTTJavaSampleWeb.war file from BTTJavaSample.ear, then
extract the \dse\server directory from the BTTJavaSampleWeb.war.
c. On your OS system, create a directory, c:\dse.
d. Copy all the files in the \dse\server directory you extracted from
BTTJavaSampleWeb.war to the c:\dse directory you created.
2. Create database and tables:
a. Run the following command in the DB2 command window to create a
database named sample:
DB2 CREATE DATABASE SAMPLE
Set a user and password for access to the database. For example, set
both user and password as db2admin.
b. Create three tables:
i. Create a directory called c:\temp.
ii. Copy <toolkit_root>\dbtools\Windows\DB2\tableDefinition\cha\
createCHATables.ddl to the c:\temp directory.
Note that <toolkit_root> refers to the root directory where you have the
toolkit installed.
iii. Change your current directory to c:\temp, and open a DB2 command
window.
iv. In the DB2 command window, run:
DB2 CONNECT TO SAMPLE USER db2admin USING db2admin.
v. In the DB2 Command Window, run:
db2 -tvf createCHATables.ddl