4 Replies Latest reply on Sep 5, 2011 3:54 PM by leaqui

    JTS - XTS integration in 4.6

    leaqui

      Hi, I´m developing some web services and I want to make them transactional. I will use WS-Atomic Transaction and the durable two phase commit protocol.

       

      I´m working with JBoss EAP 5.1.1 which includes JBoss TS 4.6. In this version of JBoss TS I don´t see clearly if I have to develop the transaction integration between JTS and XTS or it is provided by any of this modules or another one.

       

      I know that, since JBoss TS 4.7 the TxBridge module is in charge of integrating transactions between JTS and XTS.

       

      I need some advice about this. Should I develop the transaction integration between JTS and XTS (I only need inbound bridging for the moment) for TS 4.6 or should I try to integrate TS 4.7 (or any other later version that works with EAP 5.1.1) with EAP 5.1.1?

      Thanks in advance!

       

      Leandro

        • 1. Re: JTS - XTS integration in 4.6
          jhalliday

          yeah, it's not exactly straightforward is it? :-)  The key points are:

           

          - The WS-AT / XA transaction bridge (txbridge) is not a supported component of EAP 5.x

          - Recent versions of the transaction bridge rely on features of the underlying transaction engine (JTA) that are not present in the JBossTS 4.6.1.x release used by EAP 5.x.  More generally, versions of the bridge are intended to run only with the corresponding version of the JTA - a mix and match approach is not recommended.

          - It is not supported to upgrade the JTA in EAP, except for bug fix patches provided through JBoss support.

           

          So, your options are:

           

          - Run a supported EAP 5.x configuration (i.e. JBossTS 4.6.1.x), adding the unsupported prototype txbridge appropriate to that version of TS.  You won't have all the bridge features and your EAP support SLA won't cover the txbridge, but it will continue to cover the JTA. This is the most conservative approach and recommended for environments where the server is also running other production apps. Although community support is available for the older bridge release, we're unlikely to produce bug fix releases for it so you'd have to fork and maintain the txbridge code yourself.

           

          - Run a custom, unsupported EAP configuration with an updated JTA and the more recent version of the txbridge matched to that JTA. This configuration will invalidate your JTA support SLA for the EAP, but will allow for a more full featured txbridge. This is not recommended for production, but may be appropriate for development use whilst awaiting EAP6 for production use. Once again we're unlikely to offer bug fix releases for the txbridge, as even the most recent version compatible with the EAP5 integration is considered obsolete.

           

          - Run JBossAS 7.0.1, which has the latest JTA and txbridge, but no SLA at all until it gets productized as EAP6. This approach may be suitable for long term developments that will target the more recent JEE standards and are not intended to enter production until EAP6 is available. The key advantage here is that you'll be using a version of the txbridge that is current and has an active maintenance branch, so we'll probably fix any issues fairly quickly. Consider it an informal EAP6 alpha test.

          1 of 1 people found this helpful
          • 2. Re: JTS - XTS integration in 4.6
            leaqui

            Hi Jonathan, thanks for your reply.

             

            Jonathan Halliday escribió:

             

            yeah, it's not exactly straightforward is it? :-)  The key points are:

             

            - The WS-AT / XA transaction bridge (txbridge) is not a supported component of EAP 5.x

            - Recent versions of the transaction bridge rely on features of the underlying transaction engine (JTA) that are not present in the JBossTS 4.6.1.x release used by EAP 5.x.  More generally, versions of the bridge are intended to run only with the corresponding version of the JTA - a mix and match approach is not recommended.

            - It is not supported to upgrade the JTA in EAP, except for bug fix patches provided through JBoss support.

            Yeah, I imagined that...

             

            So, your options are:

             

            - Run a supported EAP 5.x configuration (i.e. JBossTS 4.6.1.x), adding the unsupported prototype txbridge appropriate to that version of TS.  You won't have all the bridge features and your EAP support SLA won't cover the txbridge, but it will continue to cover the JTA. This is the most conservative approach and recommended for environments where the server is also running other production apps. Although community support is available for the older bridge release, we're unlikely to produce bug fix releases for it so you'd have to fork and maintain the txbridge code yourself.

            I think this is the most suitable approach.

            I've integrated the txBridge from JBoss TS 4.7.0 in my EAP 5.1 but in the way I have had a little problem. The InboundBridgeManager class references the BridgeVolatileParticipant class which references the XATerminatorExtensions interface which is not included in JBoss TS 4.6. So, as I´m not going to use the Volatile protocol, I have commented the following two lines in the InboundBridgeManager:

                

                 BridgeVolatileParticipant bridgeVolatileParticipant = new BridgeVolatileParticipant(externalTxId, xid);

                 transactionManager.enlistForVolatileTwoPhase(bridgeVolatileParticipant, new Uid().toString());

             

            Do you think this would break something?

             

            Finally, do you know when EAP 6 would be available?

             

            Thanks again!

             

            Leandro

            • 3. Re: JTS - XTS integration in 4.6
              jhalliday

              Although we often use the term 'two phase commit', the full transaction protocol is actually four phase: beforeCompletion, prepare, commit, afterCompletion. In JTA/XA the Synchronization class is responsible for before|afterCompletion and XAResource for the prepare|commit. In WS-AT the equivalents are VolatileParticipant and DurableParticipant. So, what you are doing is disabling the bridging of some of the phases. If that matters or not depends on if you need them for your specific application or not.  Ensure you test your apps thoroughly, including the corner cases. IIRC the reason we split out the beforeCompletion rather than having prepare run it implicitly is that we were getting problems with protocol timeouts where e.g. a large hibernate flush took too long. That's the kind of subtle problem that can bite you if you're not paying enough attention.

               

              I don't know when EAP 6 will be released - my crystal ball is currently broken. I do know what the official target date is, but I'm not allowed to say publicly. Open a support ticket for the question, you should be able to get better schedule info by that route.

              1 of 1 people found this helpful
              • 4. Re: JTS - XTS integration in 4.6
                leaqui

                Thanks Jonathan, I'll have this in mind when designing the test cases.