Announcement Announcement Module
No announcement yet.
Two different sources Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.


  • #2
    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
      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.