I am using Spring Batch using 2 (maybe more, assume 2 for simplicity) databases. One for storing all the job datas(all the BATCH_* tables). The other for actually running my business logic data. There are some things I dont quite understand.
- When I declared my JobRepository I have already specified my TransactionManager, why do I have to do it again on my tasklet?(I am not using the default name on purpose)
- I am currently giving tasklet the same TrasactionManager as my JobRepository which is manages different connections from what I am doing inside my steps. Does that mean I have do my own transaction management inside my writer or reader?
- If #2 is true, the "What If" in How does Spring Batch transaction management work? will be a problem for me (without doing XA) right? Because my data and job data are in different connections, right?