0 Replies Latest reply on Nov 27, 2014 6:43 AM by Nick K

    JBoss EAP 4.3 - JBoss JTA question

    Nick K Newbie



      I am using JBoss EAP 4.3 and JBoss' implementation of JTA (jbossjta-4.2.2.GA.jar) and I have some questions regarding how the transaction management would work in a clustered environment, for a specific flow that I need to implement. I would greatly appreciate if anyone could help me with some questions that I have.


      The flow that I need to implement is the following:

      1. XA transaction begins.

      2. An implementation of the javax.transaction.Synchronization interface is registered to the transaction.

      3. Processing takes place and some data are cached in memory, identified by the Uid of the transaction.

      4. XA transaction commits.

      5. The "afterCompletion" method of the Synchornization instance is invoked. It retrieves the aforementioned cached data, using the Uid of the transaction, and persists them (in a different transaction).


      According to the documentation, the "afterCompletion" method of the Synchronization instance may be called by a different thread than the one that initialized the XA transaction.


      Assuming a clustered environment with two nodes (node1, node2) and the aforementioned flow, I have the following questions:

      a) Is it possible that the XA transaction is initialized in node1 and the afterCompletion method to be invoked in node2?

      b) Is the Uid of the transaction unique in the context of the cluster, or is it just unique for each node? (i.e. is it possible to have collision of Uids between the two nodes?)


      Thank you in advance for your time