beautypg.com

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

Page 230

background image

expression="execution(* com.hp.empinfo.service.EmployeeDao.*(..))"/>


class="org.springframework.jdbc.datasource.DriverManagerDataSource"
>

${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 the 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"
>

${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}

230 Integrating Frameworks

This manual is related to the following products: