HP Integrity NonStop J-Series User Manual

Page 102

Advertising
background image

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 OSS directory

created in Step 2.

4.

Go to the OSS directory where the caveatemptor_script.sql script is copied, and
create the Caveat Emptor database catalog, schema, and tables:

OSS> obey caveatemptor_script.sql;

NOTE:

By default, the caveatemptor_script.sql script file creates the database catalog

auctionccat

and schema auctionsch. To use a different database catalog and schema

name, modify:

the database catalog and schema names in this file.

the database catalog and schema names in the hibernate.properties file in the
<My SASH Home>\hibernate\samples\eg

directory of the SAMPLES.zip file.

Setting up the Hibernate and JDBC environment on NonStop

To set the CLASSPATHs for the Hibernate and JDBC driver environment, complete the following
steps:

1.

Modify the <My SASH Home>\hibernate\samples\eg\setup\setenv script file:
a.

Set the value of the hibernatehome variable same as the <NonStop Hibernate
Home
>

OSS directory.

For example, if <NonStop Hibernate Home> is /usr/tandem/sash/
hibernate-release-4.1.1.Final

, the hibernatehome variable must be set to

the same value.

b.

Set the value of the mavenrepository variable same as the <NonStop Hibernate
Maven Repository
>

OSS directory.

For example, if <NonStop Hibernate Maven Repository> is /usr/tandem/
sash/.m2

, the mavenrepository variable must be set to the same value.

c.

Set the value of the JDBC driver locations.

To use the JDBC Type 2 driver, set the value of the t2jdbc variable same as the
<JDBC T2 Installation Directory>

OSS directory.

For example, if <JDBC T2 Installation Directory> is /usr/tandem/
jdbcMx/current

, the t2jdbc variable must be set to the same value.

To use the JDBC Type 4 driver, set the value of the t4jdbc variable same as the
<NonStop SASH Home>

OSS directory.

For example, if <NonStop SASH Home> is /home/sash_usr/sash, the t4jdbc
variable must be set to the same value.

2.

Create a directory in OSS to place the script files:

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

For example:

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

NOTE:

It is suggested that you create hibernate/samples/eg/setup directory structure

in <NonStop SASH Home>.

102 Hibernate Framework

Advertising
This manual is related to the following products: