Configuring jdbc type 4 driver for sql/mx database, Configurations in the jdbc.properties file, Defining the connection url – HP Integrity NonStop H-Series User Manual
Page 78: Establishing the connection, Configurations in the, Jdbc.properties, File

PropertyPlaceholderConfigurer
class provided by the Spring framework substitutes all
the database properties specified in the
applicationContext.xml
file with the values specified
in the
jdbc.properties
file during runtime.
Modify the
applicationContext.xml
file for wiring the
jdbc.properties
file as shown
below:
NOTE:
For information on the complete configuration snippet of the
applicationContext.xml
file and the
jdbc.properties
file for JDBC Type 2 driver, see
Configuring JDBC Type 4 Driver for SQL/MX Database
To configure JDBC Type 4 driver for connecting a Spring application with SQL/MX database,
complete the following configurations:
1.
2.
NOTE:
Verify and install JDBC Type 4 driver version T1249V11 by following the steps discussed
in the
chapter.
Configurations in the
jdbc.properties
File
For making necessary JDBC configurations, you need to create the
jdbc.properties
file and
complete the following activities:
1.
Defining JDBC Type 4 Driver Class for SQL/MX Database
2.
3.
Defining JDBC Type 4 Driver Class for SQL/MX Database
To set the JDBC Type 4 driver, specify the JDBC Type 4 driver class
com.tandem.t4jdbc.SQLMXDriver
for the SQL/MX database in the
jdbc.properties
file:
jdbc.driverClassName=com.tandem.t4jdbc.SQLMXDriver
Defining the Connection URL
After you have set the JDBC Type 4 driver, specify the location of the SQL/MX server. URLs
referring to SQL/MX use the
jdbc: protocol
and have the server host and port number
embedded within the URL. To define the connection URL:
•
Specify the connection URL as
jdbc:t4sqlmx://
for the SQL/MX database in the
jdbc.properties
file as:
jdbc.url=jdbc:t4sqlmx://
Establishing the Connection
To establish connection, specify the username and password of your NonStop system in the
jdbc.properties
file:
78
Configuring Spring Applications on NonStop Systems