<?xml version="1.0" encoding="UTF-8"?>
<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.1.xsd">
	
	<bean id="job" class="org.springframework.batch.core.job.SimpleJob">
		<property name="jobRepository" ref="jobRepository"/>
		<property name="steps">
			<bean id="step" class="org.springframework.batch.core.step.tasklet.TaskletStep">
				<property name="transactionManager" ref="transactionManager"/>
				<property name="jobRepository" ref="jobRepository"/>
				<property name="tasklet">
					<bean class="org.springframework.batch.core.repository.dao.TablePrefixTests$TestTasklet"/>
				</property>
			</bean>
		</property>
	</bean>
	
	<bean class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
		<property name="jobRepository" ref="jobRepository"/>
	</bean>

	<bean class="test.jdbc.datasource.DataSourceInitializer">
		<property name="dataSource" ref="dataSource" />
		<property name="initScripts">
			<list>
				<value>org/springframework/batch/core/repository/dao/schema-prefix-hsqldb.sql</value>
			</list>
		</property>
	</bean>

	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
		<property name="url" value="jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true" />
		<property name="username" value="sa" />
		<property name="password" value="" />
	</bean>

	<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource" ref="dataSource" />
	</bean>

	<bean id="jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean">
		<property name="tablePrefix" value="PREFIX_" />
		<property name="dataSource" ref="dataSource" />
		<property name="transactionManager" ref="transactionManager" />
	</bean>

</beans>