HP Integrity NonStop J-Series User Manual

Page 41

Advertising
background image

2.

Modify the jdbc.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
is as follows:

To use the JDBC Type 2 driver, uncomment the SQL/MX settings for the JDBC Type
2 driver in the jdbc.properties file, so that the SQL/MX settings for JDBC Type
2 driver appear as:

# Properties that control the population of schema and data for a new data source

# SQL/MX Settings for JDBC Type 2 Driver
jdbc.driverClassName=com.tandem.sqlmx.SQLMXDriver
jdbc.url=jdbc:sqlmx://
jdbc.username=
jdbc.password=
jdbc.catalog=petcliniccat
jdbc.schema=petclinicsch
hibernate.dialect=org.hibernate.dialect.SqlmxDialect

NOTE:

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

need not mention the username and password in the jdbc.username and
jdbc.password

fields.

To use the JDBC Type 4 driver, uncomment the SQL/MX settings for the JDBC Type
4 driver in the jdbc.properties file, and enter 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 the JDBC Type 4 driver in the jdbc.properties file
appear as:

#-------------------------------------------------------------
# Properties that control the population of schema and data for a new data source

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

3.

Build the PetClinic web application archive (WAR)file (petclinic.war).
1.

Go to the <My SASH Home>\spring\samples\petclinic directory:

command prompt> cd <My SASH Home>\spring\samples\petclinic

2.

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

To use the JDBC Type 2 driver:
1.

Enter the following command:

command prompt> mvn clean package

The application WAR file (petclinic.war) is created in the <My SASH
Home
>\spring\samples\petclinic\target

directory.

2.

Create the WEB-INF\lib folder in <My SASH
Home
>\spring\samples\petclinic\target

directory.

3.

Copy the SQL/MX hibernate dialect JAR file (hibernate3sqlmx.jar) to <My
SASH Home
>\spring\samples\petclinic\target\WEB-INF\lib
directory.

NOTE:

The Hibernate dialect file maps the Hibernate queries (HQL) to the

SQL/MX specific queries. The Hibernate dialect file is included in the <My SASH
Home
>\spring\samples\petclinic\etc

directory located in the

SAMPLES.zip

file. For information on Hibernate, see

“Installing the Hibernate

Framework” (page 153)

.

Deploying and Running Sample Spring Applications on NonStop

41

Advertising
This manual is related to the following products: