XA support for Websphere MQ

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

XA support for Websphere MQ

PaoloCrucitti
Hi all.
I'd like to know whether XA transactions in Websphere MQ are supported by BTM or not.

In fact I can't find Websphere MQ in the list provided here:
http://docs.codehaus.org/display/BTM/JmsXaSupportEvaluation

Moreover in another topic of this forum you can find:
It might be possible to use WebSphere MQ's XA support even if IBM does not support it if it has a XAConnectionFActory implementation.

Could you please explain me it in more details?
Thanks.
Paolo.
Reply | Threaded
Open this post in threaded view
|

Re: XA support for Websphere MQ

Ludovic Orban
Administrator
I've never tried WebsphereMQ myself so I can't say for sure if it's going to work or not. Nevertheless I see no reason why it wouldn't work.

You just need to figure out the way to get the MQXAConnectionFactory, be it from some JNDI provider or via direct construction. If you have some trouble figuring out what to do feel free to ask for help here.

Reply | Threaded
Open this post in threaded view
|

Re: XA support for Websphere MQ

Simon-2745
Ludovic Orban wrote:
> I've never tried WebsphereMQ myself so I can't say for sure if it's
> going to work or not. Nevertheless I see no reason why it wouldn't work.
>
> You just need to figure out the way to get the MQXAConnectionFactory,
> be it from some JNDI provider or via direct construction. If you have
> some trouble figuring out what to do feel free to ask for help here.
>
I have some colleagues who report that they failed to get things working
for IBM MQ XA with both Bitronix and Atomikos on Tomcat but that it
worked out of the box with JOTM. It would be helpful if someone in the
community who does use IBM MQ XA with Bitronix could supply some helpful
instructions to go on the BTM wiki.

Simon


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: XA support for Websphere MQ

steveAtSignet
I've only used it in a standalone application, not with Tomcat, but I
didn't have any problems using BTM and WebSphere MQ together.

Here's the Spring bean configuration I used for the connection factory.
Note, you have to use the transportType 0 (MQJMS_TP_BINDINGS_MQ) for XA
to work properly.

<!-- XA JMS ConnectionFactory -->
<bean id="connectionFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory"
init-method="init" destroy-method="close">
        <property name="className"
value="com.ibm.mq.jms.MQXAConnectionFactory"/>
        <property name="uniqueName" value="jms/xaConnectionFactory"/>
        <property name="maxPoolSize" value="10"/>
        <property name="testConnections" value="true"/>
        <property name="driverProperties">
                <props>
                        <prop key="transportType">0</prop>
                        <prop key="queueManager">MQD001CFG</prop>
                </props>
        </property>
</bean>

-----Original Message-----
From: Simon [mailto:[hidden email]]
Sent: 21 September 2009 16:49
To: [hidden email]
Subject: Re: [btm-user] XA support for Websphere MQ

Ludovic Orban wrote:
> I've never tried WebsphereMQ myself so I can't say for sure if it's
> going to work or not. Nevertheless I see no reason why it wouldn't
work.
>
> You just need to figure out the way to get the MQXAConnectionFactory,
> be it from some JNDI provider or via direct construction. If you have
> some trouble figuring out what to do feel free to ask for help here.
>
I have some colleagues who report that they failed to get things working
for IBM MQ XA with both Bitronix and Atomikos on Tomcat but that it
worked out of the box with JOTM. It would be helpful if someone in the
community who does use IBM MQ XA with Bitronix could supply some helpful
instructions to go on the BTM wiki.

Simon


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: XA support for Websphere MQ

Ludovic Orban
Administrator
Thanks for the config example, Steven.

Could you please provide us with more details about your environment? Which version of Websphere MQ you're using, the licencing options you're using and any other relevant information you can think of?

What I'm curious about is that you haven't specified any server name, port, username nor password to connect to so I'm wondering how the MQXAConnectionFactory figures out where to connect.

I'll try to find, install and test an evaluation version in the meantime.

Ludovic

2009/9/21 Long Steven <[hidden email]>
I've only used it in a standalone application, not with Tomcat, but I
didn't have any problems using BTM and WebSphere MQ together.

Here's the Spring bean configuration I used for the connection factory.
Note, you have to use the transportType 0 (MQJMS_TP_BINDINGS_MQ) for XA
to work properly.

<!-- XA JMS ConnectionFactory -->
<bean id="connectionFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory"
init-method="init" destroy-method="close">
       <property name="className"
value="com.ibm.mq.jms.MQXAConnectionFactory"/>
       <property name="uniqueName" value="jms/xaConnectionFactory"/>
       <property name="maxPoolSize" value="10"/>
       <property name="testConnections" value="true"/>
       <property name="driverProperties">
               <props>
                       <prop key="transportType">0</prop>
                       <prop key="queueManager">MQD001CFG</prop>
               </props>
       </property>
</bean>

Reply | Threaded
Open this post in threaded view
|

RE: XA support for Websphere MQ

steveAtSignet
Ok... I'm using WebSphere MQ, Version 6.0.2.2 in a Windows environment. I don't use the "extended transaction" client, which is why I have to specify the transportType 0 (bindings mode). If you have the extended transaction client installed, you can use client mode instead.
 
As stated it was a standalone program using Spring 2.5. The connection factory configuration I sent was all the connection settings I needed in my case. The java application and the MQ queue manager were on the same server so a hostName wasn't needed, I was using the default port for WebSphere MQ (1414), the queue manager sits in a cluster rather than using a channel (saving more complication there), and in this case no authentication was used.
 
The only other MQ related configuration was in a separate application context where I gave each of the Spring managed services I'd written the name of the queue to which they needed to connect.
 
So that really was it. It all worked very easily with that set-up.
 
I hope this helps.
 
Steve.


From: Ludovic Orban [mailto:[hidden email]]
Sent: 21 September 2009 19:25
To: [hidden email]
Subject: Re: [btm-user] XA support for Websphere MQ

Thanks for the config example, Steven.

Could you please provide us with more details about your environment? Which version of Websphere MQ you're using, the licencing options you're using and any other relevant information you can think of?

What I'm curious about is that you haven't specified any server name, port, username nor password to connect to so I'm wondering how the MQXAConnectionFactory figures out where to connect.

I'll try to find, install and test an evaluation version in the meantime.

Ludovic

2009/9/21 Long Steven <[hidden email]>
I've only used it in a standalone application, not with Tomcat, but I
didn't have any problems using BTM and WebSphere MQ together.

Here's the Spring bean configuration I used for the connection factory.
Note, you have to use the transportType 0 (MQJMS_TP_BINDINGS_MQ) for XA
to work properly.

<!-- XA JMS ConnectionFactory -->
<bean id="connectionFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory"
init-method="init" destroy-method="close">
       <property name="className"
value="com.ibm.mq.jms.MQXAConnectionFactory"/>
       <property name="uniqueName" value="jms/xaConnectionFactory"/>
       <property name="maxPoolSize" value="10"/>
       <property name="testConnections" value="true"/>
       <property name="driverProperties">
               <props>
                       <prop key="transportType">0</prop>
                       <prop key="queueManager">MQD001CFG</prop>
               </props>
       </property>
</bean>