Apr 12th, 2008, 09:03 AM
Two different sources
Just wanted to confirm whether I can use mysql for all my spring batch related tasks (job status, execution etc) and DB2/Oracle for my actual application? Do I just have to create another datasource in config file pointing to DB2/Oracle and reference to it from my DAO config?
Should this work without any problem? I need to try this on monday, but wanted to get experts input?
This will help me to keep my spring batch related tables isolated from my actual application tables.
Apr 12th, 2008, 12:18 PM
You can certainly use multiple data sources, but in order to maintain the transactions across all of them, you'll need to use a JTA platform transaction manager and the appropriate data sources.
Apr 13th, 2008, 09:20 AM
You brought up a very good point about JTA! It wouldn't harm to have batch related tables in the same db, just was curious if we separate it out whether spring batch will handle the transactions internally.
Thanks a lot! To start with I am going to go with the tables in the same database.