Jdbc.properties – HP Integrity NonStop H-Series User Manual
Page 159

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
After the change:
<bean id="dataSource" class="org.springframework.samples.jpetstore.property.SetDatabase"
destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="catalog" value="${jdbc.catalog}"/>
<property name="schema" value="${jdbc.schema}"/>
</bean>
jdbc.properties
(<Spring Home>\samples\jpetstore\war\WEB-INF\jdbc.properties):
This is the configuration file for connecting to the SQL/MX database. This file is modified to add
the SQL/MX JDBC properties instead of the default HSQL JDBC properties used by JPetStore.
Changes to the
jdbc.properties
file
The following modifications were made to set the JDBC properties for the SQL/MX database:
•
The HSQL Settings section that includes the JDBC properties and the HSQL dialect file name
was commented out.
•
The SQL/MX Settings section that includes the JDBC Type 2 and Type 4 drivers was added.
Before the change:
# Properties file with JDBC-related settings.
# Applied by PropertyPlaceholderConfigurer from "dataAccessContext-local.xml".
# Targeted at system administrators, to avoid touching the context XML files.
jdbc.driverClassName=org.hsqldb.jdbcDriver
jdbc.url=jdbc:hsqldb:hsql://localhost:9002
jdbc.username=sa
jdbc.password=
After the change:
# Properties file with JDBC-related settings.
# Applied by PropertyPlaceholderConfigurer from "dataAccessContext-local.xml".
# Targeted at system administrators, to avoid touching the context XML files.
#jdbc.driverClassName=org.hsqldb.jdbcDriver
#jdbc.url=jdbc:hsqldb:hsql://localhost:9002
#jdbc.username=sa
#jdbc.password=
#-------------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 2 Driver
#jdbc.driverClassName=com.tandem.sqlmx.SQLMXDriver
#jdbc.url=jdbc:sqlmx://
#jdbc.username=
#jdbc.password=
#jdbc.catalog=jpetstorecat
#jdbc.schema=jpetstoresch
#-------------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 4 Driver
#jdbc.driverClassName=com.tandem.t4jdbc.SQLMXDriver
#jdbc.url=jdbc:t4sqlmx://<HP NonStop System IP Address>:<Port No.>
#jdbc.username=<HP NonStop Username>
#jdbc.password=<HP NonStop Password>
#jdbc.catalog=jpetstorecat
#jdbc.schema=jpetstoresch
Customizing JPetStore
159