beautypg.com

D sample jdbc configuration for spring, Appendix d: sample jdbc configuration for spring, Sample jdbc configuration for – HP Integrity NonStop J-Series User Manual

Page 334

background image

D Sample JDBC Configuration for Spring

This appendix describes the consolidated JDBC Type 2 driver configuration and the JDBC Type 4
driver configuration in the applicationContext.xml and jdbc.properties files.

JDBC Type 2 driver configurations
The consolidated JDBC Type 2 driver configuration in applicationContext.xml is as
follows:


xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">



${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}


class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">


classpath:jdbc.properties



The SQL/MX settings for JDBC Type 2 driver in jdbc.properties appear as follows:

#----------------------------------------------------------------------#
SQL/MX Settings for JDBC Type 2 Driver

jdbc.url= jdbc:sqlmx://
jdbc.driver= com.tandem.sqlmx.SQLMXDriver
jdbc.user =
jdbc.password=

JDBC Type 4 driver configurations
The consolidated JDBC Type 4 driver configuration in applicationContext.xml is as
follows:


xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">



${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}


class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">


classpath:jdbc.properties

334 Sample JDBC Configuration for Spring

This manual is related to the following products: