2 Replies Latest reply on Nov 5, 2019 11:46 AM by ochaloup

    JTA mode vs JTS mode in the context of Wildfly/EAP

    u448119

      Hi, I have one basic question.

       

      On this forum in several places when talking about different Narayana functionality, it is mentioned that Narayana can run in JTA mode and in JTS mode. My understanding is that it is referring to local vs distributed transactions.

       

      In the implementation terms, I figured out that from the Xid one can determine if the transaction is created by JTA by checking if XId format ID is equal to XATxConverter.FORMAT_ID (like for example in JTATransactionLogXAResourceOrphanFilter.java)

       

      In the context of Wildfly/EAP when are transactions in JTS mode and when are in JTA mode?

       

      Thanks.

        • 1. Re: JTA mode vs JTS mode in the context of Wildfly/EAP
          mmusgrov

          Like you discovered, I believe we use a different format id depending upon whether we are in JTA or JTS mode:

          narayana/FormatConstants.java at master · jbosstm/narayana · GitHub

           

          The mode (JTA versus JTS) can be set in the WFLY/EAP config file: Developer Guide

          1 of 1 people found this helpful
          • 2. Re: JTA mode vs JTS mode in the context of Wildfly/EAP
            ochaloup

            u448119  wrote:

             

            On this forum in several places when talking about different Narayana functionality, it is mentioned that Narayana can run in JTA mode and in JTS mode. My understanding is that it is referring to local vs distributed transactions.

            I would just add that the JTS is native for distributed transactions but JTA is capable run distributed transactions as well. Bear in mind that XA transactions are referred to as distributed on many places - which is true - but JTS distributed transactions are those which spans over multiple WildFly containers. XA transactions are those which involved multiple XA resources (database, JMS broker) and that's native for JTA and JTS mode as well.
            JTS spans the distributed transactions over IIOP calls while JTA on WildFly spans the transactions over EJB remoting.

             

            u448119  wrote:

             

            In the context of Wildfly/EAP when are transactions in JTS mode and when are in JTA mode?

            As Mike pointed in the prior answer the JTA and JTS mode may be switched via jboss-cli or via XML config files. When switching to JTS it has to be enabled under the transaction subsystem and in the IIOP subsystem as well.

            1 of 1 people found this helpful