Manual

jdbc.username=<HP NonStop Username>
jdbc.password=<HP NonStop Password>
Configurations in the applicationContext.xml File
For making necessary JDBC configurations, you need to create the applicationContext.xml
file and complete the following activities:
1. Defining the Placeholder for JDBC Type 4 Driver Class
2. Defining the Placeholder for Connection URL
3. Defining the Placeholder for Establishing the Connection
4. Wiring of JDBC Properties
Defining the Placeholder for JDBC Type 4 Driver Class
Modify the applicationContext.xml file to define a placeholder for the JDBC Type 4 driver
class name com.tandem.t4jdbc.SQLMXDriver from the jdbc.properties file as shown
below.
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClassName">
<value>${jdbc.driver}</value>
</property>
NOTE: It is recommended that you use com.mchange.v2.c3p0.ComboPooledDataSource
as the datasource class because it provides various parameters for connection pooling. Other
available datasource classes are org.apache.commons.dbcp.BasicDataSource provided
by Apache DBCP and
org.springframework.jdbc.datasource.DriverManagerDataSource provided by
Spring framework.
Defining the Placeholder for Connection URL
Modify the applicationContext.xml file to define a placeholder for the connection URL
from the jdbc.properties file as shown below.
<property name="url">
<value>${jdbc.url}</value>
</property>
Defining the Placeholder for Establishing the Connection
Modify the applicationContext.xml file to define a placeholder for the username and
password from 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
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
Spring Framework Configurations 79