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
Appendix B. Setting up a Branch Transformation Toolkit sample application 495
You will see messages indicating that CHAChildren, CHAInstance, and
CHAControl tables have been created successfully.
3. Import BTTJavaSample.ear.
a. Start WebSphere Studio Application Developer 5.1.1. From the menu bar,
open J2EE perspective. Select File Import EAR file. Click Next.
b. In the Import wizard, set the following parameters, and click Finish:
EAR File:
<toolkit_root>\samples\JavaSampleApplication\StandAlone
\BTTJavaSample.ear
Enterprise Application project name: BTTJavaSample
4. Import dummysnalu0.rar.
a. Open J2EE perspective and from the menu bar, select File Import
RAR file. Click Next.
b. In the Import wizard, set the following values, and click Finish:
Connector File: <toolkit_root>\jars\ dummysnalu0.rar
Connector Project: dummysnalu0Connector2
5. Set up server in WebSphere Studio Application Developer 5.1 test
environment.
a. Open Server perspective.
b. Select New Server and Server Configuration, and set the following
parameters, and click Finish:
•Server name: JavaSampleServer
Folder: Servers
•Server Type: Integration Test Environment
c. Define JAAS Authentication entries in server configuration.
i. In the Server Configuration panel, double-click the server instance
JavaSampleServer.
ii. Select the Security tab. In the Cell Settings section, click Add to add a
JAAS Authentication Entry and set the following parameters:
Alias: CHA
•User ID: db2admin
Password: db2admin
Description: JavaSample
iii. Click Add to add a JAAS Authentication Entry and set the following
parameters, and click OK:
Alias: sna
•User ID: sna

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.