8 Replies Latest reply on Jul 23, 2002 1:04 PM by stevewink

    Can MQSeries participate in 2-phase commit with the JBoss Tx

    bslee01

      Hi,

      Currently, I am experimenting Jboss App Server 2.4.4 and trying to get MQSeries 5.2 to work with Jboss default TxManager on Win 2K platform. Unfortunately, it didn't work out.

      I am wondering if there is anyone has any clue on this.

      I want both Oracle 8.1.7 (Update or Insert) and MQSeries 5.2 (Sending or Receiving messages) to execute as a single unit of work in one transaction on JBoss Default TxManager. Is this possible ?

        • 1. Re: Can MQSeries participate in 2-phase commit with the JBos
          amalter

          Yes, but not with the container invoker that comes with JBoss...

          As a caveat, I am using JBoss 2.4.4 with MQSeries 5.2 using the JMS MA88 service pack on WinNT sp6.

          I've talked with the IBM MQSeries guys at Hursley about trying to get JBoss and MQSeries (Using the MA88 JMS service pack) to work well together...

          The big problem is that JBoss and MQSeries have interpreted portions of the JMS ASF spec slightly differently (This is unsurprising, the asf portion of the JMS spec is only 3 pages long. JMS might be the most under-documented portion of J2EE). This means that the non-XA stuff works fine, but the XA stuff dies.

          On the mdb receive side I have re-written the container invoker for MDB's to use the standard JMS interfaces. This works fine for MQSeries now. Unfortunately, its currently pretty custom to fix only our issue. It only handles XA Queues and reads a custom configuration file. However, if you want I can email it over to you. It should be pretty easy to get it to work for a more generalized situation. You then just substitute it in the standard-jboss.xml.

          The sender side is much easier. Just use the standard JMS interfaces and subscribe MQ's XA resource into JBoss's TXManager. I can send you over my QueueSender if you want an example.

          Good luck,
          Adam Malter
          TradeCard Inc.
          amalter (at) tradecard.com

          • 2. Re: Can MQSeries participate in 2-phase commit with the JBos
            haberg

            Adam, I´m trying to integrate MQSeries into JBoss 2.4.4 but can´t get it to work properly. All I need is for an MDB to be able to listen to a remote MQSeries queue.

            Would it be possible to get a peek at your work?

            /Henrik.

            • 3. Re: Can MQSeries participate in 2-phase commit with the JBos
              amalter

              Do you want MQ to participate in the XA Transaction?

              If you don't the standard ASF stuff that comes with JBoss works just fine. You just substitute the MQ JMS factories for the JBoss ones inside jboss.jcml.

              If you want transactional stuff, you might need a need JMSContainerInvoker. I wrote one for us and would gladly send the relevant bits to you..

              Send me an email at: amalter (at) tradecard.com
              and I'll forward it back to you...

              Cheers,
              Adam

              • 4. Re: Can MQSeries participate in 2-phase commit with the JBos
                user57

                If yo have found a problem with the JBoss impl, please submit a patch or a bug with sufficent information for us to fix. Even if you only list the specifics for your situation it will help to improve the system.

                --jason

                • 5. Re: Can MQSeries participate in 2-phase commit with the JBos
                  amueller

                  > If yo have found a problem with the JBoss impl,
                  > please submit a patch or a bug with sufficent
                  > information for us to fix

                  Don't be too fast with patches or others will not work anymore. XA in conjunction with ASF is a very difficult thing where you have respect both, JMS and EJB specs. MQSeries has certainly a different interpretation of XA/ASF, hence, a code change would effect other JMS impl such as JBossMQ, SwiftMQ. Both are working very well currently.

                  The current impl is hammered in stone. So please keep your hands off! :-)

                  • 6. Re: Can MQSeries participate in 2-phase commit with the JBos
                    amueller

                    You might contribute another JMSContainerInvoker for MQSeries but must not change the current one.

                    • 7. Re: Can MQSeries participate in 2-phase commit with the JBos
                      hchirino

                      I'm shure we could accept JMS Invoker - MQSeries implementation under the contrib section.

                      Regards,
                      Hiram

                      • 8. Re: Can MQSeries participate in 2-phase commit with the JBos
                        stevewink

                        Hi,

                        I am going to be using MQSeries 5.2 as a JMS provider with JBoss 3, outside of EJBs.

                        Is the problem with MQSeries JMS participating in two phase commit still relevent to JBoss 3?

                        Is the problem described relevent to non EJB JMS code?

                        rgds,
                        Steve