Integrating NonStop JDBC Type 4 Driver With IBM WebSphere Applications

4
For example,
<property name="wsas_home"
value="C:\Program Files\WebSphere\AppServer"/>
4. Download the struts distribution and copy the struts.jar, struts-logic.tld and the supporting
jakarta-commons jars (all those prefixed with “commons-”) to bank/jar.
Compiling the Java source
At the command line, change to the j2eetutorial/bank
directory. All the build commands will be run
from here. Compilation should be fairly straightforward—just type the following command:
ant -f wsas-build.xml all
This compiles the source code and creates the necessary .jar, .war, and .ear files. If there aren’t any
errors, you should find a newly created build directory with the class files in it. Also in the jar
directory, you should see the DukesBank.ear file.
Setting up the database
Before you can deploy the application, you need a viable database for it to run against. If you are
writing an application that uses container-managed EJB persistence, you can configure the engine to
create the tables for you at deployment; otherwise, you must have a set of scripts to do the job. This is
also a convenient way of pre-populating the database with data.
The J2EE Software Development Kit (SDK) comes with the Cloudscape database, which is used
throughout the tutorials. You will be using the NonStop SQL/MX Database, which is running on the
HP NonStop Operating System.
You must therefore accomplish a few tasks before you can successfully test your application:
Create and populate the NonStop SQL/MX Database with the appropriate tables and values
Start the HP NonStop ODBC/MX Service on the NonStop system
Make the Type 4 Driver jar file available in the WebSphere Application Server environment
Start and Configure WebSphere Application Server to use the NonStop JDBC Type 4 Driver to
connect to NonStop SQL/MX Database
Populating the NonStop SQL/MX Database
Supplementing this document is a zip file named NonStopFiles_WebSphere.zip. One of the files in this
archive, named dukesDB.sh, contains the script file to create and populate the necessary database on
NonStop SQL/MX Database. Unpack the archive file and transfer dukesDB.sh (in ASCII mode) to the
HP NonStop Open System Services (OSS) environment.
To set up the NonStop SQL/MX Database, change to the directory on OSS where the dukesDB.sh is
located and run the following command:
OSS> ./dukesDB.sh
This creates the database in the schema DUKECAT.DUKESCHEMA.