2 Replies Latest reply on Feb 19, 2008 4:18 PM by shapirod

    no-tx-datasource vs local-tx-datasource

    shapirod Newbie

      Hello all,

      If an EJB is using bean managed transactions, and there is no UserTranscation in effect, is there any difference in overhead for DB reads between using a no-tx-datasource vs local-tx-datasource?

      Thanks,
      Daniel Shapiro
      Agilquest, Inc.

        • 1. Re: no-tx-datasource vs local-tx-datasource
          Vicky Kak Master

           

          "shapirod" wrote:
          Hello all,

          If an EJB is using bean managed transactions, and there is no UserTranscation in effect, is there any difference in overhead for DB reads between using a no-tx-datasource vs local-tx-datasource?

          Thanks,
          Daniel Shapiro
          Agilquest, Inc.

          There would not be any difference if there is no ongoing transaction.
          If there is an on going transaction then some time will be taken in resource enlistment in TransactionManager , the associated TM implementation would optimize the 2PC(two phase protocol) to just a commit call when the TM realizes that there in only one participant in TX .
          Again the 2PC optimizations is not mandated by JCA specs , the TM should do it .


          • 2. Re: no-tx-datasource vs local-tx-datasource
            shapirod Newbie

            Thank you! That's very helpful.