HP Integrity NonStop J-Series User Manual

Page 104

Advertising
background image

1.

Go to the <My SASH HOME>\hibernate\samples\web\src\main\resources
directory on the Windows system.

2.

Modify the hibernate.properties file to update the JDBC configuration. You can
use either the JDBC Type 2 driver or the JDBC Type 4 driver by setting their SQL/MX
settings as follows:

For JDBC Type 2 driver, uncomment the SQL/MX settings for JDBC Type 2 driver,
so that it appears as:

#------------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 2 Driver
hibernate.dialect org.hibernate.dialect.SqlmxDialect
hibernate.connection.driver_class com.tandem.sqlmx.SQLMXDriver
hibernate.connection.url jdbc:sqlmx://
hibernate.connection.username
hibernate.connection.password
hibernate.connection.catalog eventcat
hibernate.connection.schema eventsch

NOTE:

Because JDBC Type 2 driver is located on the NonStop system, you need

not mention the username and password in the
hibernate.connection.username

and hibernate.connection.password

fields.

For JDBC Type 4 driver, uncomment the SQL/MX settings for JDBC Type 4 driver,
and enter the values of JDBC URL (NonStop system IP Address and port number of
the JDBC data source), NonStop system username, and password so that it appears
as:

#-------------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 4 Driver
hibernate.dialect org.hibernate.dialect.SqlmxDialect
hibernate.connection.driver_class com.tandem.t4jdbc.SQLMXDriver
hibernate.connection.url jdbc:t4sqlmx://<HP NonStop System IP Address>:<Port No.>
hibernate.connection.username <HP NonStop Username>
hibernate.connection.password <HP NonStop Password>
hibernate.connection.catalog eventcat
hibernate.connection.schema eventsch

NOTE:

The hibernate.properties file, located in <My SASH

HOME>\hibernate\samples\web\src\main\resources

, has the database

catalog name set to eventcat and schema name set to eventsch. If the database
catalog name eventcat and schema name eventsch already exists, or if you
want to use a different database catalog and schema name, modify the:

values for the hibernate.connection.catalog and
hibernate.connection.schema

property in the hibernate.properties

file in <My SASH
HOME
>\hibernate\samples\web\src\main\resources

.

database catalog and schema names in the eventmanager_script.sql
script file, as discussed in

“Setting up the Deployment Environment on NonStop”

(page 101)

.

3.

Build the EventManager web application archive WAR file
(hibernate-tutorial-web-3.5.0-CR-2.war).
1.

Go to the <My SASH Home>\hibernate\samples\web directory:

command prompt> cd <My SASH Home>\hibernate\samples\web

2.

Build the Event Manager web archive using JDBC Type 2 driver or JDBC Type 4 driver.

1.

Build the Event Manager web archive:

command prompt> mvn clean package

104 Hibernate Framework

Advertising
This manual is related to the following products: