Manual

\org
includes the java source files and mapping files of Caveat Emptor.
2. Modify the build file of Caveat Emptor.
If you plan to use the JDBC Type 2 driver, set the hibernate.root property in <My
SASH Home>\hibernate\samples\eg\build_jdbct2.xml as:
<property name="hibernate.root" value="<Hibernate Home>/>
For example, if your <Hibernate Home> is C:\hibernate-3.2, modify
hibernate.root as:
<property name="hibernate.root" value="C:\hibernate-3.2/>
If you plan to use the JDBC Type 4 driver:
a. Set the hibernate.root properties in build_jdbct4.xml as:
<property name="hibernate.root" value="<Hibernate Home>/>
For example: If your <Hibernate Home> is C:\hibernate-3.2 ,modify
hibernate.root as:
<property name="hibernate.root" value="C:\hibernate-3.2/>
b. Set the jdbct4.root properties in build_jdbct4.xml as:
<property name="jdbct4.root" value="<JDBC T4 installation directory>"/>
For example, if the <JDBC T4 installation directory> is C:\JDBCT4,
modify jdbct4.root as:
<property name="jdbct4.root" value="C:\JDBCT4"/>
3. Configure the JDBC driver settings for the NonStop SQL/MX database.
a. Go to the <My SASH HOME>\hibernate\samples\eg directory on your Windows
system.
b. Modify the hibernate.properties file to update the JDBC configuration. You can
use either JDBC/MX Type 2 driver or JDBC/MX Type 4 driver. The SQL/MX settings
for each of them is as follows:
If you plan to use the JDBC/MX Type 2 driver, uncomment SQL/MX settings for
JDBC Type 2 driver in the hibernate.properties file so that the SQL/MX
settings for JDBC Type 2 driver appear as follows:
#------------------------------------------------------------------------------
# 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 resides on the NonStop system, you need
not mention the username and password in the
hibernate.connection.username and hibernate.connection.password
fields.
If you plan to use the JDBC/MX Type 4 driver, uncomment the SQL/MX settings
for JDBC Type 4 driver in the hibernate.properties file and enter the values
of JDBC URL (NonStop system IP Address and port number of JDBC data source),
NonStop system username, and password.
The SQL/MX settings for JDBC Type 4 driver in hibernate.properties appear
as follows:
#-------------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 4 Driver
hibernate.dialect=org.hibernate.dialect.SqlmxDialect
Deploying and Running Sample Hibernate Application on NonStop 301