2 Replies Latest reply on Aug 18, 2011 1:20 PM by Leandro Quiroga

    TxBridge on JBossEAP 5.0

    Jörgen Brutar Newbie

      I am struggling with XA-transactions between two JBoss EAP 5.0 servers.

      The setup is as follows:

      AS 1 runs an application using Spring + JPA, no EJB:s. Transations are handled with Spring through the JBoss JTATransactionManager. Everything works neatly with this setup.

      AS 2 is hosting a Webservice which does database updates with JPA.

       

      What I would like to achieve is an XA-transaction spanning over i.e the following scenario:

       

      A JTA-transaction starts in AS 1 including database updates. The Webservice in AS 2 is called during this transaction causing database updates to take place in AS 2. AS 1 makes some additional database updates after the Webservice has been completed.

       

      In case of a commit in AS 1 everything should commit (AS 1 + AS 2).

      In case of a rollback both the updates in AS 1 and AS 2 should roll back.

       

      Both servers have XTS deployed . AS 1 runs with Apache CXF and AS 2 with native JBoss WS.

       

      Now to my questions:

      Is it possible to achieve the scenario descrived above considering our current setup?

      I understand that I need the TxBridge (both outbound and inbound) to translate between JTA and WS-AT. What I understand the TxBridge is not included/supported  in JBossTS 4.6 (which i believe we are using). There might also be an issue with support for CXF if I understand correctly.

       

      Is it possible to build the TxBridge included in JBossTS 4.7 with CXF-support and deploy that together with the bundled XTS on JBoss EAP 5.0?

        • 1. Re: TxBridge on JBossEAP 5.0
          Andrew Dinn Master

          Jörgen Brutar wrote:

           

          . . .

           

          Now to my questions:

          Is it possible to achieve the scenario descrived above considering our current setup?

          I understand that I need the TxBridge (both outbound and inbound) to translate between JTA and WS-AT. What I understand the TxBridge is not included/supported  in JBossTS 4.6 (which i believe we are using). There might also be an issue with support for CXF if I understand correctly.

           

          Is it possible to build the TxBridge included in JBossTS 4.7 with CXF-support and deploy that together with the bundled XTS on JBoss EAP 5.0?

          The TX Bridge code is not supported in EAP. However, if you can use it in EAP without replacing any of the EAP components then as far as JBoss is concerned it is the saem as if it was application code i.e. it's use does not invalidate your support contract but it's up to you to work out how to use it and how to fix it if it breaks or fasils to do what you want. Of course, we are also willing to provide best-effort help via the forums so you are asking this in the right place.

           

          The 4.7.0 txbridge code may possibly compile and execute on EAP 5.0. There were a lot  of changes to the XTS code between 4.6 and 4.7 but I don't think these will have an effect on the txbridge code itself. We don't (have time to) test mix and match versions so normally the only answer to questions like this is a hunch, a shrug and an invitation to try it and see.

           

          The more  important issue is that version 4.7.0 of the bridge code does not have a complete and fully correct implementation of recovery for the bridged-to transactions.  If memory serves me (not guaranted since this is over 6 months ago) WS-AT to JTA bridging recovery had no problems but there were still some problems with JTA to WS-AT bridging recovery which meant that in a few corner cases the birdged-to WS-At transaction might be left in doubt.

           

          It might be that a later version of the bridge code with better recovery support will still compile and run on EAP 5.0. Jonathan wrote this code and he might be able to provide better advice on which versions are compatible and how bullet-proof recovery is.

          • 2. Re: TxBridge on JBossEAP 5.0
            Leandro Quiroga Newbie

            Hi JÃrgen, I´m in a similar situation.

            Could you use the txBridge with JBoss EAP 5?

            Which versions have you used?

            Did you make any changes?

            Thanks!

             

            Leandro