3 Replies Latest reply on Sep 7, 2009 11:33 AM by Rudi Adianto

    Multiple Database - Sanity Check

    Rudi Adianto Newbie


      We are planning to offer our client SaaS model, therefore have a requirement to use multiple databases (as many as 50) in one seam application. Those databases will have exactly the same structure. Here's what we are doing:

      - Like the classic model that have been asked here several times, the database connection will be chosen based on the logged in user. For this we are planning to use the solution in this thread http://seamframework.org/Community/MultipleDatabases .

      - There are transactions that span multiple databases, e.g. inter bank transfer, where we should do debit operation in one database and credit operation in another. For a particular transactions, there will be at most 3 different dataSource involved. For this, we’ll setup JTA/XA transaction manager and list all those 50 dataSource to participate in it.

      Are these sound sane? How would other implement these?
      On point 2, will there be a performance degradation related to the number of resource participating in a transaction? (I’m sure there will, but has anyone sanely enlist 50 resource in one transaction when only 3 resource needed). Any other idea on this one?


      Rudi A.