beautypg.com

Configurations in the applicationcontext.xml file, Defining the placeholder​​ for jdbc driver class, Defining the placeholder for connection url – HP Integrity NonStop J-Series User Manual

Page 35: Wiring of jdbc properties

background image

For Type 4 Driver:

Specify the username and password of your NonStop system.

jdbc.username=
jdbc.password=

Configurations in the applicationContext.xml File

Defining the Placeholder for JDBC Driver Class

For JDBC Type 2 driver:

HP recommends to use com.tandem.sqlmx.SQLMXDataSource as the datasource class. This
datasource can be configured as follows:


value="samplecat">
value="samplesch">

For JDBC Type 4 driver:

HP recommends to use com.tandem.t4jdbc.SQLMXDataSource as the datasource class for
JDBC Type 4 drivers. This datasource can be configured as follows:


value="jdbc:t4sqlmx://<HP NonStop System IP Address>
:<Port No.>">

value="">
value="">
value="yes">
value="samplecat">
value="samplesch">

You can also use the org.apache.commons.dbcp.BasicDataSource provided by Apache
for JDBC Type 4 driver. The configuration is as follows:


value="jdbc:t4sqlmx://<HP NonStop System IP Address>
:<Port No.>">

value="">
value="">

Defining the Placeholder for Connection URL

Define a placeholder for the connection URL in the jdbc.properties file as shown below.


${jdbc.url}

Defining the Placeholder for Establishing the Connection

Define a placeholder for the username and password in the jdbc.properties file as shown
below.


${jdbc.user}


${jdbc.password}

Wiring of JDBC Properties

After the database properties are set, wire the jdbc.properties file in the
applicationContext.xml

file so that the actual values are available during runtime. The

PropertyPlaceholderConfigurer

class provided by the Spring framework substitutes the

Configuring Spring Applications on NonStop Systems

35

This manual is related to the following products: