HP Integrity NonStop J-Series User Manual
Page 160

a.
Go to the <My SASH HOME>\hibernate\samples\eg\src\main\resources\
directory on the Windows system.
b.
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. The SQL/MX settings for
each of them are:
•
To use the JDBC Type 2 driver, uncomment the SQL/MX settings for the JDBC Type
2 driver in the hibernate.properties file so that the SQL/MX settings for JDBC
Type 2 driver appear 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 auctioncat
hibernate.connection.schema auctionsch
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.
•
To use the JDBC Type 4 driver, uncomment the SQL/MX settings for the JDBC Type
4 driver in the hibernate.properties file, and type the values of the JDBC URL
(NonStop system IP Address and port number of the JDBC data source), NonStop
system username, and password.
The SQL/MX settings for JDBC Type 4 driver in hibernate.properties appear
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 auctioncat
hibernate.connection.schema auctionsch
NOTE:
The hibernate.properties file, located in <My SASH
HOME>\hibernate\samples\eg\src\main\resources
, has the database
catalog name set to auctioncat and schema name set to auctionsch. If the
database catalog name auctioncat and schema name auctionsch already
exists, or if you want to use a different database catalog and schema name, modify
the following:
◦
values for the hibernate.connection.catalog and
hibernate.connection.schema
property in the hibernate.properties
file in
<My SASH HOME>\hibernate\project\tutorials\eg\
src\main\resources.
◦
database catalog and schema names in the caveatemptor_script.sql
script file, as discussed in
“Setting up the Deployment Environment on NonStop”
.
3.
Build Caveat Emptor (Caveatemptor.jar).
160 Installing the Hibernate Framework