Setting up the deployment environment on nonstop, Setting up sql/mx database on nonstop – HP Integrity NonStop J-Series User Manual

Page 161

Advertising
background image

a.

Go to the <My SASH Home>\hibernate\samples\eg\ directory.

b.

Use Maven to build the Caveat Emptor JAR file.

If you want to use the JDBC Type 2 driver, build the Caveat Emptor JAR using the
command:

command prompt> mvn clean package

After successful build of Caveat Emptor, a new directory named target is created in the
<My SASH Home>\hibernate\samples\eg

directory. The application JAR file

(hibernate-tutorial-eg-3.5.0-CR-2.jar) is created in the target directory.

Caveat Emptor is built on the Windows system.

Setting up the Deployment Environment on NonStop

Setting up the deployment environment on a NonStop system comprises the following actions:

1.

“Setting up SQL/MX database on NonStop” (page 161)

2.

“Setting up the Hibernate and JDBC environment on NonStop” (page 162)

Setting up SQL/MX database on NonStop

To set up the SQL/MX database for Caveat Emptor on a NonStop system, complete the following
steps:

1.

Edit the <My SASH
Home
>\hibernate\samples\eg\dbconfig\caveatemptor_script.sql

file as

follows:

<$datavol>

: specify the Guardian volume for the primary partition of the table. For

example: $data01.

<user>

: specify the owner of the schema. For example: super.sashusr.

<node.$vol>

: specify the location of the metadata tables for the catalog. For example:

\NSK01.$data01.

<subvol reference>

: specify the designated subvolume name for the schema. For

example: SASH1.

NOTE:

The subvolume name is always prefixed by ZSD and must have eight characters

(including ZSD).

2.

Create a directory in OSS to place the database script files:

OSS> mkdir -p <NonStop SASH Home>/hibernate/samples/eg/dbconfig

For example:

OSS> mkdir -p /home/sash_usr/sash/hibernate/samples/eg/dbconfig

NOTE:

<NonStop SASH Home> can be any working directory. It is suggested that you

create the hibernate/samples/eg/dbconfig directory structure in <NonStop SASH
Home

>.

3.

Copy the caveatemptor_script.sql script from the <My SASH
Home
>\hibernate\samples\eg\dbconfig

Windows directory to the <NonStop SASH

Home>/hibernate/samples/eg/dbconfig

OSS directory.

4.

Go to the OSS directory where the caveatemptor_script.sql script is copied:

OSS> cd <NonStop SASH Home>/hibernate/samples/eg/dbconfig

For example:

OSS> cd /home/sash_usr/sash/hibernate/samples/eg/dbconfig

5.

Create the Caveat Emptor database catalog, schema, and tables:

Deploying and Running Sample Hibernate Applications on NonStop

161

Advertising
This manual is related to the following products: