Results 1 to 3 of 3

Thread: Two different sources

  1. #1
    Join Date
    Apr 2008
    Posts
    174

    Default Two different sources

    Hello All,

    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.

    Thanks!

  2. #2
    Join Date
    Jan 2008
    Posts
    10

    Default

    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.

  3. #3
    Join Date
    Apr 2008
    Posts
    174

    Lightbulb good point

    Hello gk5885,

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •