beautypg.com

For programmatic transaction, Modifying applicationcontext.xml file, Modifying – HP Integrity NonStop H-Series User Manual

Page 378: Applicationcontext.xml, File

background image


${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}




${jdbc.catalog}


${jdbc.schema}


For Programmatic Transaction

This section describes only the

PlatformTransactionManager

implementation for

Programmatic Transaction.

Modifying

applicationContext.xml

File

Modify the

applicationContext.xml

file to include the bean definition for the transaction

manager class.

NOTE:

Because the EmpInfo application contains only JDBC operations,

org.springframework.jdbc.datasource.DataSourceTransactionManager

is used

as the transaction manager class.

Add the following lines of code to include the bean definition for the transaction manager class:



After modification, the

applicationContext.xml

file should appear as:

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">
class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close">

${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}




${jdbc.catalog}


${jdbc.schema}






378

Using Spring Transaction Manager

This manual is related to the following products: