E customizing sample applications, Customizing caveat emptor, Added files – HP Integrity NonStop J-Series User Manual
Page 221: Hibernate.properties, Setenv, Appendix e: customizing sample applications, Customizing sample applications

E Customizing Sample Applications
Customizing Caveat Emptor
To customize the Caveat Emptor sample application to run on NonStop systems, three files were
added and one file was modified.
Added Files
•
•
•
Modified File
•
Added Files
hibernate.properties
(<My SASH
Home>\hibernate\samples\eg\src\main\resources\hibernate.properties
)
This file provides hibernate configuration to Caveat Emptor.
•
The content of the hibernate.properties file is:
##------------------------------------------------------------------------------
# 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
#-------------------------------------------------------------------------------
# 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
#For JDBC Type 4 Driver:
#
#<HP NonStop System IP Address> - This is the IP address of your NonStop system
#<Port No.> - This is the Port Number of JDBC Data Source
#<HP NonStop Username> - This is the HP NonStop system UserName
#<HP NonStop Password> - This is the HP NonStop system Password
setenv
(<My SASH Home>\hibernate\samples\eg\setup\setenv)
This script file sets the Hibernate and JDBC libraries in the NonStop environment.
The content of this script file is:
#!/bin/ksh
hibernatehome="<NonStop Hibernate Home>"
mavenrepository="<NonStop Hibernate Maven Repository>"
t4jdbc="<NonStop SASH Home>"
t2jdbc="<JDBC T2 Installation Directory>"
Usage="\n Usage: ./setenv <T2/T4>\n\n For JDBC/MX Type2 driver use 'T
2'\n For JDBC/MX Type4 driver use 'T4'\n"
usage()
Customizing Caveat Emptor 221