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

For Type 4 Driver:
Specify the username and password of your NonStop system.
jdbc.username=<HP NonStop Username>
jdbc.password=<HP NonStop 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:
<bean id="dataSource" class="com.tandem.sqlmx.SQLMXDataSource">
<property name="catalog"> value="samplecat"></property>
<property name="schema"> value="samplesch"></property>
</bean>
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:
<bean id="dataSource" class="com.tandem.t4jdbc.SQLMXDataSource">
<property name="url"> value="jdbc:t4sqlmx://<HP NonStop System IP Address>
:<Port No.>"></property>
<property name="user"> value="<HP NonStop Username>"></property>
<property name="password"> value="<HP NonStop Password>"></property>
<property name="useExternalTransaction"> value="yes"></property>
<property name="catalog"> value="samplecat"></property>
<property name="schema"> value="samplesch"></property>
</bean>
You can also use the org.apache.commons.dbcp.BasicDataSource provided by Apache
for JDBC Type 4 driver. The configuration is as follows:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="url"> value="jdbc:t4sqlmx://<HP NonStop System IP Address>
:<Port No.>"></property>
<property name="user"> value="<HP NonStop Username>"></property>
<property name="password"> value="<HP NonStop Password>"></property>
</bean>
Defining the Placeholder for Connection URL
Define a placeholder for the connection URL in the jdbc.properties file as shown below.
<property name="url">
<value>${jdbc.url}</value>
</property>
Defining the Placeholder for Establishing the Connection
Define a placeholder for the username and password in the jdbc.properties file as shown
below.
<property name="username">
<value>${jdbc.user}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
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