Configuring jdbc driver for sql/mx database, Configuring jdbc type 2 driver for sql/mx database, Configurations in the jdbc.properties file – HP Integrity NonStop J-Series User Manual

Page 63: Defining the connection url, Establishing the connection, Configurations in the applicationcontext.xml file

Advertising
background image

Configuring JDBC Driver for SQL/MX Database

The JDBC driver to be used when a Spring application (using Spring DAO) connects to the SQL/MX
database needs to be specified in the applicationContext.xml and jdbc.properties
file provided by the Spring framework.

This section discusses the following:

“Configuring JDBC Type 2 Driver for SQL/MX Database” (page 63)

“Configuring JDBC Type 4 Driver for SQL/MX Database” (page 65)

Configuring JDBC Type 2 Driver for SQL/MX Database

To configure JDBC Type 2 Driver for connecting a Spring application with SQL/MX database,
complete the following configurations:

1.

“Configurations in the jdbc.properties File” (page 63)

2.

“Configurations in the applicationContext.xml File” (page 63)

NOTE:

Install JDBC Type 2 driver version T1275H50 by following the steps discussed in the

“Installing the Spring Framework” (page 36)

chapter.

Configurations in the jdbc.properties File

For making necessary JDBC configurations, complete the following activities:

“Defining JDBC Type 2 Driver Class for SQL/MX Database” (page 63)

“Defining the Connection URL” (page 63)

“Establishing the Connection” (page 63)

Defining JDBC Type 2 Driver Class for SQL/MX Database

Specify the JDBC Type 2 driver class com.tandem.sqlmx.SQLMXDriver for the SQL/MX
database in the jdbc.properties file:

jdbc.driverClassName=com.tandem.sqlmx.SQLMXDriver

Defining the Connection URL

After you have set the JDBC Type 2 driver, enter the location of the SQL/MX server. For URLs
referring to SQL/MX database, use the jdbc: protocol embedded within the URL. To define
the connection URL, specify the connection URL as jdbc:sqlmx:// for the SQL/MX database
in the jdbc.properties file:

jdbc.properties file:
jdbc.url=jdbc:sqlmx://

Establishing the Connection

Specify the username and password with no values in the jdbc.properties file:

jdbc.username=
jdbc.password=

Configurations in the applicationContext.xml File

For making necessary JDBC configurations, complete the following activities:

1.

“Defining the placeholder for JDBC Type 2 Driver Class” (page 64)

2.

“Defining the Placeholder for Connection URL” (page 64)

3.

“Defining the Placeholder for Establishing the Connection” (page 64)

4.

“Wiring of JDBC Properties” (page 64)

Spring Framework Configurations

63

Advertising
This manual is related to the following products: