All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.spring.batch.bootstrap.manager.data-source-context.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jdbc="http://www.springframework.org/schema/jdbc"
	xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

	<bean id="dataSource"
		class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName" value="${batch.jdbc.driver}" />
		<property name="url" value="${batch.jdbc.url}" />
		<property name="username" value="${batch.jdbc.user}" />
		<property name="password" value="${batch.jdbc.password}" />
		<property name="testWhileIdle" value="${batch.jdbc.testWhileIdle}"/>
		<property name="validationQuery" value="${batch.jdbc.validationQuery}"/>
	</bean>

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

	<!--  Initialise the database if enabled: -->
	<jdbc:initialize-database data-source="dataSource" enabled="${batch.data.source.init}" ignore-failures="DROPS">
		<jdbc:script location="${batch.drop.script}"/>
		<jdbc:script location="${batch.schema.script}"/>
		<jdbc:script location="${batch.business.schema.script}"/>
	</jdbc:initialize-database>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy