There are many places to configure transactionManager, it's unclear whether it's mandatory or not, from my understanding, it's should be optional since dataSource is mandatory, Spring Batch could create DataSourceTransactionManager() as default, correct me if I'm wrong.
And it's unclear whether it's used for batch metadata operations or JDBC reader/writer of step, if Spring Boot's @BatchDataSource and @BatchTransactionManager are used for separated DataSource, which transactionManager should be used for StepBuilder::chunk?
|
public <I, O> SimpleStepBuilder<I, O> chunk(int chunkSize, PlatformTransactionManager transactionManager) { |
There are many places to configure
transactionManager, it's unclear whether it's mandatory or not, from my understanding, it's should be optional sincedataSourceis mandatory, Spring Batch could createDataSourceTransactionManager()as default, correct me if I'm wrong.And it's unclear whether it's used for batch metadata operations or JDBC reader/writer of step, if Spring Boot's
@BatchDataSourceand@BatchTransactionManagerare used for separated DataSource, whichtransactionManagershould be used forStepBuilder::chunk?spring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/StepBuilder.java
Line 118 in e1b0f15