Caveat emptor, Building caveat emptor on windows – HP Integrity NonStop J-Series User Manual

Page 100

Advertising
background image

Caveat Emptor

The Caveat Emptor sample application is an auction system. The intended users of the application
are bidders and the sellers of various items.

NOTE:

The Caveat Emptor sample application described here uses Hibernate 3.5.1 version.

To use Caveat Emptor, the following steps are involved:

“Building Caveat Emptor on Windows” (page 100)

“Setting up the Deployment Environment on NonStop” (page 101)

“Deploying Caveat Emptor on NonStop” (page 103)

“Running Caveat Emptor on NonStop” (page 103)

Building Caveat Emptor on Windows

1.

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

2.

Configure the JDBC driver settings for the NonStop SQL/MX database.
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 by setting the SQL/MX
settings as follows:

For JDBC Type 2 driver, uncomment the SQL/MX settings for the 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 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 the

hibernate.connection.password

fields.

For JDBC Type 4 driver, uncomment the SQL/MX settings for the JDBC Type 4 driver,
and enter the values for the 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 auctioncat
hibernate.connection.schema auctionsch

100 Hibernate Framework

Advertising
This manual is related to the following products: