/web/DRCP/war/WEB-INF/spring-persistence-transaction-local.xml
http://drcp.googlecode.com/ · XML · 40 lines · 15 code · 9 blank · 16 comment · 0 complexity · da6db2e6991df5f178f8f8858537983a MD5 · raw file
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
- <!--
- - Application context definition for JPetStore's data access layer.
- - Accessed by business layer objects defined in "applicationContext.xml"
- - (see web.xml's "contextConfigLocation").
- -
- - This version of the data access layer works on a combined database,
- - using a local DataSource with DataSourceTransactionManager. It does not
- - need any JTA support in the container: It will run as-is in plain Tomcat.
- -->
- <beans>
-
-
- <!-- ========================= RESOURCE DEFINITIONS ========================= -->
-
-
- <!-- Local Apache Commons DBCP DataSource that refers to a combined database -->
- <!-- (see dataAccessContext-jta.xml for an alternative) -->
- <!-- The placeholders are resolved from jdbc.properties through -->
- <!-- the PropertyPlaceholderConfigurer in applicationContext.xml -->
- <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>
-
- <!-- Transaction manager for a single JDBC DataSource -->
- <!-- (see dataAccessContext-jta.xml for an alternative) -->
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource"/>
- </bean>
-
-
-
- </beans>