You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sharpor <wi...@gmail.com> on 2009/05/29 07:43:40 UTC

How can I connect to Websphere MQ?

Dear All,
I have several client machines and a server machine.
On every client machine, there has been depolyed an activeMQ and there is a
WebsphereMQ server on the server machine.
Our Java application using activemq in client machine to send messages to
the server machine.
This means that the Java application send messages to the activemq and hope
the message would automatically be delivered to the WebsphereMQ in the
server machine. 
Any friend know how to configure the activemq?
I'm new to activemq, and thank you! :)
-- 
View this message in context: http://www.nabble.com/How-can-I-connect-to-Websphere-MQ--tp23774518p23774518.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I connect to Websphere MQ?

Posted by GrolfCry <gr...@gmail.com>.
sharpor,have You found a solution for your issue?

sharpor wrote:
> 
> Dear all,
> Also, I study the failover transport and found that failover is used for
> client instead of the broker.
> That means that if I use a java application to put msg into a queue in
> activemq, I can use failover transport to avoid msg lost when the network
> is not so reliable.
> But in this case, I want activemq to handle failover when it forward msg
> to another jms provider. 
> I checked the schema for jmsBridgeConnectors, jmsQueueConnector,
> outboundQueueBridge and only found  outboundQueueBridge has an attribute
> maximumRetries and on attribute such as interval. Also I worry that the if
> I set maximumRetries, the activemq would keep try and hang up.
> If any friend guide me to meet my requirement. Thank you.
> 
> 
> sharpor wrote:
>> 
>> Thank you all very much!
>> 
>> I used Bruce's method to config my Xbean and got a xml parsed error said
>> that util:constant error. After changing it to <property
>> name="transportType" value="1"/>, it works! That means websphere mq can
>> get message from activemq.
>> 
>> As my original thought, when the local activemq couldn't connect to the
>> websphere mq for some reason, activemq should keep the message and once
>> activemq finds that it can re-connect to the websphere mq, it will
>> automatically send the message to the websphere mq.
>> 
>> To verify this, I shutdown that websphere mq and found the message is
>> kept in activemq. but I found the error shown in activemq console said
>> MQRC_CONNECTION_BROKEN and when i re-start the websphere mq , the
>> activemq could not send the kept messages to the websphere mq and even
>> more, it couldn't transfer new message to the websphere mq. 
>> Doesn't activemq support the feature I thought above or I should do some
>> configuration? 
>> Any friend could give me a help? Thank you.
>> 
>> 
>> 
>> bsnyder wrote:
>>> 
>>> On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
>>> <jo...@ttmsolutions.com> wrote:
>>>>
>>>> I'd recommend Camel and its JMS component to develop a bridge between
>>>> the two
>>>> JMS providers.
>>>>
>>>> http://camel.apache.org/jms.html
>>> 
>>> To actually connection to WebspherMQ, you'll need to configure a bean
>>> for the WebphereMQ connection factory. Below is an example:
>>> 
>>> <bean id="mqConnectionFactory"
>>> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>>>     <property name="transportType">
>>>       <util:constant
>>> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>>>     </property>
>>>     <property name="queueManager" value="QMGR_NAME_GOES_HERE" />
>>>     <property name="hostName" value="HOST_ADDRESS_GOES_HERE" />
>>>     <property name="channel" value="QMGR_CHANNEL_NAME_GOES_HERE" />
>>>     <property name="port" value="PORT_NUMBER_GOES_HERE" />
>>>   </bean>
>>> 
>>> Bruce
>>> -- 
>>> perl -e 'print
>>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>>> );'
>>> 
>>> ActiveMQ in Action: http://bit.ly/2je6cQ
>>> Blog: http://bruceblog.org/
>>> Twitter: http://twitter.com/brucesnyder
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-connect-to-Websphere-MQ--tp23774518p24095349.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I connect to Websphere MQ?

Posted by sharpor <wi...@gmail.com>.
Dear all,
Also, I study the failover transport and found that failover is used for
client instead of the broker.
That means that if I use a java application to put msg into a queue in
activemq, I can use failover transport to avoid msg lost when the network is
not so reliable.
But in this case, I want activemq to handle failover when it forward msg to
another jms provider. 
I checked the schema for jmsBridgeConnectors, jmsQueueConnector,
outboundQueueBridge and only found  outboundQueueBridge has an attribute
maximumRetries and on attribute such as interval. Also I worry that the if I
set maximumRetries, the activemq would keep try and hang up.
If any friend guide me to meet my requirement. Thank you.


sharpor wrote:
> 
> Thank you all very much!
> 
> I used Bruce's method to config my Xbean and got a xml parsed error said
> that util:constant error. After changing it to <property
> name="transportType" value="1"/>, it works! That means websphere mq can
> get message from activemq.
> 
> As my original thought, when the local activemq couldn't connect to the
> websphere mq for some reason, activemq should keep the message and once
> activemq finds that it can re-connect to the websphere mq, it will
> automatically send the message to the websphere mq.
> 
> To verify this, I shutdown that websphere mq and found the message is kept
> in activemq. but I found the error shown in activemq console said
> MQRC_CONNECTION_BROKEN and when i re-start the websphere mq , the activemq
> could not send the kept messages to the websphere mq and even more, it
> couldn't transfer new message to the websphere mq. 
> Doesn't activemq support the feature I thought above or I should do some
> configuration? 
> Any friend could give me a help? Thank you.
> 
> 
> 
> bsnyder wrote:
>> 
>> On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
>> <jo...@ttmsolutions.com> wrote:
>>>
>>> I'd recommend Camel and its JMS component to develop a bridge between
>>> the two
>>> JMS providers.
>>>
>>> http://camel.apache.org/jms.html
>> 
>> To actually connection to WebspherMQ, you'll need to configure a bean
>> for the WebphereMQ connection factory. Below is an example:
>> 
>> <bean id="mqConnectionFactory"
>> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>>     <property name="transportType">
>>       <util:constant
>> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>>     </property>
>>     <property name="queueManager" value="QMGR_NAME_GOES_HERE" />
>>     <property name="hostName" value="HOST_ADDRESS_GOES_HERE" />
>>     <property name="channel" value="QMGR_CHANNEL_NAME_GOES_HERE" />
>>     <property name="port" value="PORT_NUMBER_GOES_HERE" />
>>   </bean>
>> 
>> Bruce
>> -- 
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>> 
>> ActiveMQ in Action: http://bit.ly/2je6cQ
>> Blog: http://bruceblog.org/
>> Twitter: http://twitter.com/brucesnyder
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-connect-to-Websphere-MQ--tp23774518p23792577.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I connect to Websphere MQ?

Posted by sharpor <wi...@gmail.com>.
Thank you all very much!

I used Bruce's method to config my Xbean and got a xml parsed error said
that util:constant error. After changing it to <property
name="transportType" value="1"/>, it works! That means websphere mq can get
message from activemq.

As my original thought, when the local activemq couldn't connect to the
websphere mq for some reason, activemq should keep the message and once
activemq finds that it can re-connect to the websphere mq, it will
automatically send the message to the websphere mq.

To verify this, I shutdown that websphere mq and found the message is kept
in activemq. but I found the error shown in activemq console said
MQRC_CONNECTION_BROKEN and when i re-start the websphere mq , the activemq
could not send the kept messages to the websphere mq and even more, it
couldn't transfer new message to the websphere mq. 
Doesn't activemq support the feature I thought above or I should do some
configuration? 
Any friend could give me a help? Thank you.



bsnyder wrote:
> 
> On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
> <jo...@ttmsolutions.com> wrote:
>>
>> I'd recommend Camel and its JMS component to develop a bridge between the
>> two
>> JMS providers.
>>
>> http://camel.apache.org/jms.html
> 
> To actually connection to WebspherMQ, you'll need to configure a bean
> for the WebphereMQ connection factory. Below is an example:
> 
> <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>     <property name="transportType">
>       <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>     </property>
>     <property name="queueManager" value="QMGR_NAME_GOES_HERE" />
>     <property name="hostName" value="HOST_ADDRESS_GOES_HERE" />
>     <property name="channel" value="QMGR_CHANNEL_NAME_GOES_HERE" />
>     <property name="port" value="PORT_NUMBER_GOES_HERE" />
>   </bean>
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-connect-to-Websphere-MQ--tp23774518p23788973.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I connect to Websphere MQ?

Posted by Bruce Snyder <br...@gmail.com>.
On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
<jo...@ttmsolutions.com> wrote:
>
> I'd recommend Camel and its JMS component to develop a bridge between the two
> JMS providers.
>
> http://camel.apache.org/jms.html

To actually connection to WebspherMQ, you'll need to configure a bean
for the WebphereMQ connection factory. Below is an example:

<bean id="mqConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
    <property name="transportType">
      <util:constant
static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
    </property>
    <property name="queueManager" value="QMGR_NAME_GOES_HERE" />
    <property name="hostName" value="HOST_ADDRESS_GOES_HERE" />
    <property name="channel" value="QMGR_CHANNEL_NAME_GOES_HERE" />
    <property name="port" value="PORT_NUMBER_GOES_HERE" />
  </bean>

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: How can I connect to Websphere MQ?

Posted by Joe Fernandez <jo...@ttmsolutions.com>.
I'd recommend Camel and its JMS component to develop a bridge between the two
JMS providers. 

http://camel.apache.org/jms.html

Joe
http://www.ttmsolutions.com
 

sharpor wrote:
> 
> Dear All,
> I have several client machines and a server machine.
> On every client machine, there has been depolyed an activeMQ and there is
> a WebsphereMQ server on the server machine.
> Our Java application using activemq in client machine to send messages to
> the server machine.
> This means that the Java application send messages to the activemq and
> hope the message would automatically be delivered to the WebsphereMQ in
> the server machine. 
> Any friend know how to configure the activemq?
> I'm new to activemq, and thank you! :)
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-connect-to-Websphere-MQ--tp23774518p23779238.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.