1

I desperately need to know if I can use RepositoryItemReader and RepositoryItemWriter to accomplish for example transfer data from one database to another?

I can probably do it using JdbcPagingItemReader and JdbcBatchItemWriter since both have methods for setting dataSource (probably).

Please help.

kace
  • 11
  • 1
  • The sort answer is yes. However, this is a very broad question without knowing the specifics of what you are trying to achieve and what are the non-functional constraints around the requirements. Please include the code you have tried and specific problems you have run into for objective answers. – manish Dec 14 '16 at 03:21
  • Thanks @manish. Data sources, transaction managers, and entity manager factories are setup different for each modules. Each of these modules contains the entity models and jparepositories. These modules also contains a class annotated with Configuration and "houses" the beans for dataSources, etc.. Now, we are using these modules in our spring cloud task application and the task's responsibility is to retrieve from tables of module1 and save them to module2's DB. I can't seem to put some sample codes in my original question. – kace Dec 14 '16 at 05:47
  • 1
    Possible duplicate of [Seperate datasource for jobrepository and writer of Spring Batch](http://stackoverflow.com/questions/26820818/seperate-datasource-for-jobrepository-and-writer-of-spring-batch) – Luca Basso Ricci Dec 14 '16 at 07:38

0 Answers0