<?xml version="1.0" encoding="UTF-8"?>
<!--
  - Application context representing the application without any security services.
  -
  -->

<beans 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-3.0.xsd">

	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
		<property name="dataSource" ref="dataSource"/>
	</bean>

	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
		<property name="url" value="jdbc:hsqldb:mem:insecuredms"/>
		<property name="username" value="sa"/>
		<property name="password" value=""/>
	</bean>

	<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
		<property name="transactionAttributeSource">
			<value>
				sample.dms.DocumentDao.*=PROPAGATION_REQUIRED
			</value>
		</property>
		<property name="transactionManager" ref="transactionManager" />
	</bean>

	<bean id="documentDao" class="sample.dms.DocumentDaoImpl">
		<property name="dataSource" ref="dataSource"/>
	</bean>

	<bean id="dataSourcePopulator" class="sample.dms.DataSourcePopulator">
		<constructor-arg ref="dataSource"/>
		<constructor-arg ref="documentDao"/>
	</bean>

</beans>
