3 Replies Latest reply on Jun 26, 2012 5:22 PM by vamshi nooka

    mysql-xa-ds.xml and mysql-ds.xml file

    JBoss Is My Boss Newbie

      1) Please provide me the difference between mysql-xa-ds.xml and mysql-ds.xml file.

       

      2) Along with that please let me know if we can merge both files and use it as one DS file or not.

       

      3) If we will use it as one what will be impact in behaviour of DB connection management.If not what is reason of it.

        • 1. Re: mysql-xa-ds.xml and mysql-ds.xml file
          Wolf-Dieter Fink Master

          1)

          The difference is the datasource type:

          * local transactions

            There is no two-phase-commit protocol to ensure consistency of distributed transactions

            If you have only one datasource (mean also no JMS or other JCA involved) you can use this save

          * XA transactions

            Protocol to ensure consistency in distributed systems (search for XATransaction i.e. wikipedia)

            If you have more than one database involved you should use this because of consistency

           

          2)

          You can have more than one datasource definition in one *-ds.xml file if you need

           

          3)

          I don't understand it exactly, but if you mean the difference of having one (with both definitions) or two ds.xml files the only difference is that you can not (un)deploy it separate.

          The pools and connections are separate anyway.

          1 of 1 people found this helpful
          • 3. Re: mysql-xa-ds.xml and mysql-ds.xml file
            vamshi nooka Newbie

            The above posts clearly explain the diffrence between XA and local TX.

            For your other question ie merging of two ds files

             

            1)do you want to add two defn's in one ds file

             

            yes you can certainly do it as explained in the above post

             

            2) your endpoint is same for both defn's and just want to use one common def'n for all txs

             

            Just use the XA datasource it can serve both the purpose with an overhead of negligible increased response time