1 Reply Latest reply on Oct 18, 2012 11:31 AM by Tom Jenkinson

    XA Support for distributed Transactions

    Aby V Newbie

      First of all, I would like to thank  JBoss team to come up with XA Compliance. I have a few queries regarding the implementation using JbossTs Transaction Manager for XA. I believe, i could better present it as scenario's  so that it could reach you with better clarity

      I am using InfiniSpan as my datagrid and an RDBMS for persistence. I need to evict data from Infinispan at some stage and inserting these entries to my rdbms through  a JDBC call.Both the transaction branches( transaction from Jboss and JDBC should be XA Transactions) should be synchronized. I need help on how to implement using JBossTs as the transaction manager.

      If somebody could provide an explanation with a code snippet it would be of great value.

        • 1. Re: XA Support for distributed Transactions
          Tom Jenkinson Master

          Hi Aby,

           

          It may be worth asking this question in the infinispan forums as the answer revolves around whether you can evict data from Infinispan within the scope of an XA transaction. If this is possible, you can then update the JDBC database within the same transaction quite easily.

           

          Please do let me know if you need any more assistance once you have the answer on the capabilities provided by Infinispan.


          Briefly the algorithm is:

           

          tx.begin()

          tx.enlist(inifinispan)

          tx.enlist(database)

          database.update(value of inifispan.evict());

          tx.commit()

           

          As you can see doing this relies on whether infinspan is able to evict data within the scope of a transaction, a question I am unable to answer.

           

          Tom

          1 of 1 people found this helpful