Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<bean id="repositoryDataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@guest01:1521:myora" />
<property name="username" value="scott" />
<property name="password" value="tiger" />
<property name="initialSize" value="2" />
<property name="minIdle" value="2" />
<property name="maxActive" value="10" />
<property name="maxIdle" value="5" />
</bean>
<bean id="testDataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@guest01:1521:myora" />
<property name="username" value="scott" />
<property name="password" value="tiger" />
<property name="initialSize" value="2" />
<property name="minIdle" value="2" />
<property name="maxActive" value="10" />
<property name="maxIdle" value="5" />
</bean>
<bean id="repositoryTransactionManager" lazy-init="true"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="repositoryDataSource" />
</bean>
<bean id="testTransactionManager" lazy-init="true"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="testDataSource" />
</bean>
<batch:job-repository id="jobRepository"
data-source="repositoryDataSource"
transaction-manager="repositoryTransactionManager"
isolation-level-for-create="READ_COMMITTED"
table-prefix="BATCH_"
/>
<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
<property name="jobRepository" ref="jobRepository" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment