Reputation: 25
Like described in the linked article below, with Java configuration it is possible to override the JobRepository bean by extending DefaultBatchConfigurer and overriding createJobRepository.
How can this be achieved in a context.xml file where the jobrepository bean is defined like this
<bean id="jobRepository_new"
class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean">
<property name="databaseType" value="Oracle" />
<property name="dataSource" ref="dataSource-batch" />
<property name="transactionManager" ref="transactionManager" />
<property name="tablePrefix" value="BATCH_" />
<property name="lobHandler" ref="oracleLobHandler" />
</bean>
?
Can't serialize access for this transaction when running single job, SERIALIZED isolation level
Upvotes: 0
Views: 756
Reputation: 31590
Unlike with the Java configuration style, there is nothing provided by default (that you can override) when you use the XML configuration style.
So you just need configure the job repository bean as needed like shown in the snippet you shared.
Upvotes: 1