8 Replies Latest reply on Sep 29, 2003 12:13 PM by tslusser

    JmsXA and multiple configurations

    tslusser

      Hi,

      Is it possible to have one JmsXA for SpyConnections running locally and to have another XA adapter for third party JMS Connections? I have queues locally and remotely and want messages to participate in XA transactions.

      I can explicitly reference the XAConnectionFactory for the third party JMS server but I must code the conn.start and session.commit for the message to commit. Does this mean it is not a part of the currently running XA transaction?

      Thanks,
      Ted

        • 1. Re: JmsXA and multiple configurations

          You can, but there are somethings it does not support,
          e.g. Setting an exception listener.

          I put a post on jboss-user about it a while back.
          Check www.mail-archive.com to search jboss-user

          Regards,
          Adrian

          • 2. Re: JmsXA and multiple configurations
            tslusser

            Thanks for your reply. I was able to make it work by creating another resource adaptor and configuring it to use a new JmsProviderAdapterJNDI as defined in jms-ds.xml. Is this the correct approach? Does this get around the exception handler issue?

            Thanks,
            Ted

            • 3. Re: JmsXA and multiple configurations

              I think it should be usefull to have your solution posted. can you post your configuration and some guidelines?

              Regards,

              Stephane

              • 4. Re: JmsXA and multiple configurations
                tslusser

                Hi Stephane,

                I created a JMS provider loader in jms-ds.xml that I named EgateJMSProvider. Then I created an invoker-proxy-binding in standardjboss.xml that uses the EgateJMSProvider, along with a container-configuration that I can reference in my mdb deploy descriptor.

                Next I deployed another jms resource adaptor with a customized ra.xml. This also references the EgateJMSProvider to proxy my third party Connection Factories.

                Finally back in jms-ds.xml I create another tx-connection-factory that uses the resource adaptor I just deployed.

                Then when I want a connection to the third party JMS server that I want to enlist in my current XA transaction I call the jndi-name of the new tx-connection-factory (egate/JmsXA).

                The only strange thing about this configuration that I can sense is that the tx-connection-factory defined in jms-ds.xml maps to the resource adaptor based soley on the adapter-display-name. This seems odd but it is working. :-)

                Kind Regards,
                Ted

                • 5. Re: JmsXA and multiple configurations
                  tslusser

                  I had trouble attaching files...

                  • 6. Re: JmsXA and multiple configurations

                    thanks a lot for the explanation

                    Regards,

                    Stephane

                    • 7. Re: JmsXA and multiple configurations

                      You don't need to deploy another rar,
                      you can just deploy another tx-connection-factory with:

                      <config-property name="JMSProviderAdapterJNDI" type="java.lang.String">whatever</config-property>

                      Regards,
                      Adrian

                      • 8. Re: JmsXA and multiple configurations
                        tslusser

                        Hi Adrian,

                        Thanks for the tip!

                        Kind Regards,
                        Ted