How can I connect to Websphere MQ?

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

How can I connect to Websphere MQ?

sharpor
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! :)
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

joe_fernandez
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

Bruce Snyder
On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
<[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

sharpor
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.


<quote author="bsnyder">
On Fri, May 29, 2009 at 6:39 AM, Joe Fernandez
<joe.fernandez@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

</quote>
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

sharpor
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.

<quote author="sharpor">
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
<joe.fernandez@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

</quote>
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

GrolfCry
sharpor,have You found a solution for your issue?
<quote author="sharpor">
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
<joe.fernandez@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

</quote>
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

jnsunkersett
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bruce Snyder
Hello Bruce,

I have a similar situation but I could not quite understand your answer -
"you'll need to configure a bean for the WebphereMQ connection factory"

Could you elaborate more or point me to some documentation
- where exactly will I have to do this, in WebSphere MQ or ApacheCamel or ?

My problem statement:
My j2EE code uses JMS to send/ receive with MQSeries.
Need to talk with a Legacy server which communicates using only TCP ip/ sockets.

So need to build a bridge like
(j2EE-app) <-- jms --> (MQseries) <-- TCP/ip --> (Legacy-Server)

So what can I use to build the TCP i/p bridge?

thank you,
Jeevan
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

jessica121turner
In reply to this post by sharpor
To create a connection factory, a queue connection factory, or a topic connection factory for use with the WebSphere MQ messaging provider, use the administrative console to complete the following steps. You can choose either to enter all the required connection information using the Create WebSphere MQ JMS resource wizard or to use a client channel definition table (CCDT) to establish a connection to the WebSphere MQ messaging provider.
Procedure how to connect WebSphere MQ:
In the navigation pane, select the type of connection factory you want to create:
To create a connection factory, click Resources > JMS->Connection factories.
To create a queue connection factory, click Resources > JMS->Queue connection factories.
To create a topic connection factory, click Resources > JMS->Topic connection factories.
Select the Scope setting corresponding to the scope of the connection factory that you want to create.
Click New in the content pane to start the Create WebSphere MQ JMS resource wizard.
Select WebSphere MQ messaging provider, then click OK.
On the "Configure basic attributes" page, specify the following properties, then click Next.
Name
The name by which this connection factory is known for administrative purposes within WebSphere Application Server.
JNDI name
The name that is used to bind this connection factory into the Java Naming and Directory Interface (JNDI) namespace.
Description
Optional. A description of this connection factory for administrative purposes within WebSphere Application Server.
On the "Select connection method" page, choose how you want to specify the connection details for to the WebSphere MQ messaging provider by selecting one of the following options, then click Next.
Enter all the required information into this wizard
Choosing this option takes you to the "Supply queue manager details" page (see step 7), where you can start entering the connection details using the Create WebSphere MQ JMS resource wizard.
Use a client channel definition table
Choosing this option takes you to the "Specify client channel definition table" page (see step 8), where you can enter details of the client channel definition table that you want to use.
If you have chosen to enter all the required information using the wizard, complete the following steps:
On the "Supply queue manager details" page, enter the name of the queue manager or queue-sharing group that you want to connect to then click Next.
On the "Enter connection details" page, specify the details for the connection, then click Next to continue to the "Test connection" page. You can choose either to enter host and port information separately, or enter host and port information in the form of a connection name list. You must only choose the option to use a connection name list if you are creating a connection to a multi-instance queue manager. You must not use this option for connections to non-multi-instance queue managers as that can result in transaction integrity issues.

http://www.assertmeds.com/forzest.html
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

alexashlokys
In reply to this post by joe_fernandez
please try this.
To create a connection factory, a queue connection factory, or a topic
connection factory for use with the WebSphere MQ messaging provider, use the
administrative console to complete the following steps. You can choose
either to enter all the required connection information using the Create
WebSphere MQ JMS resource wizard or to use a client channel definition table
(CCDT) to establish a connection to the WebSphere MQ messaging provider.
Procedure how to connect WebSphere MQ:
In the navigation pane, select the type of connection factory you want to
create:
To create a connection factory, click Resources > JMS->Connection factories.
To create a queue connection factory, click Resources > JMS->Queue
connection factories.
To create a topic connection factory, click Resources > JMS->Topic
connection factories.
Select the Scope setting corresponding to the scope of the connection
factory that you want to create.
Click New in the content pane to start the Create WebSphere MQ JMS resource
wizard.
Select WebSphere MQ messaging provider, then click OK.
On the "Configure basic attributes" page, specify the following properties,
then click Next.
Name
The name by which this connection factory is known for administrative
purposes within WebSphere Application Server.
JNDI name
The name that is used to bind this connection factory into the Java Naming
and Directory Interface (JNDI) namespace.
Description
Optional. A description of this connection factory for administrative
purposes within WebSphere Application Server.
On the "Select connection method" page, choose how you want to specify the
connection details for to the WebSphere MQ messaging provider by selecting
one of the following options, then click Next.
Enter all the required information into this wizard
Choosing this option takes you to the "Supply queue manager details" page
(see step 7), where you can start entering the connection details using the
Create WebSphere MQ JMS resource wizard.
Use a client channel definition table
Choosing this option takes you to the "Specify client channel definition
table" page (see step 8), where you can enter details of the client channel
definition table that you want to use.
If you have chosen to enter all the required information using the wizard,
complete the following steps:
On the "Supply queue manager details" page, enter the name of the queue
manager or queue-sharing group that you want to connect to then click Next.
On the "Enter connection details" page, specify the details for the
connection, then click Next to continue to the "Test connection" page. You
can choose either to enter host and port information separately, or enter
host and port information in the form of a connection name list. You must
only choose the option to use a connection name list if you are creating a
connection to a multi-instance queue manager. You must not use this option
for connections to non-multi-instance queue managers as that can result in
transaction integrity issues.

http://secureabortionpills.com/



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

rwilson
In reply to this post by sharpor
I found this forum very interesting and informative. Thank you for posting
the query and helping with the solutions.
Regard,
generic levitra <http://www.onlinepillsshop.net/product/generic-levitra>  



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: How can I connect to Websphere MQ?

jamesbrown
Please try this.

1. Install WebSphere MQ
Download the IBM WebSphereMQ installer from the IBM website and run it:

https://www.ibm.com/us-en/marketplace/secure-messaging/purchase

Follow the instructions of the installation wizard.

After the installation is complete, open the WebSphere MQ Explorer. The
following steps show how you can use this application to create a basic
configuration.


Click the image to enlarge it.

2. Create a Queue Manager
Before creating a queue, you need to create a queue manager. Queue managers
handle application connections to queues listed in the manager and manage
the queues. They ensure that the commands are executed properly, events
happen and messages are added to the appropriate queues. To create a queue
manager:

Right-click Queue Managers in the navigator panel and select New > Queue
Manager


Click the image to enlarge it.

Specify a name for the queue manager.

        This name will be used later when configuring destinations.

Click the image to enlarge it.

Click Next > Next > Next and specify a port number in the Listen on port
number field. You can leave the default port number and go to the next step.

Click Finish to create the queue manager.

3. Disable Authentication
To simplify the connection process, disable authentication for the queue
manager:

        This step is not obligatory. You can still connect to the WebSphereMQ
server that requires authentication.
Right-click the created queue manager and select Properties.

In the subsequent dialog, switch to the Communications tab and set the
Channel authentication records option to Disabled.


Click the image to enlarge it.

Close the dialog.

Make sure there are no items in the QueueManagerName > Channels > Channel
Authentication Records panel.

4. Create a Queue
Queues in Websphere MQ are message containers. When an application is
connected to a queue manager, it can retrieve messages from a queue or add
them to a queue. To create a queue:

Right-click the QueueManagerName > Queues item in the navigator panel and
select New > Local Queue.

In the subsequent dialog, specify the queue Name.

Click Finish to create the queue with the default parameters, or click Next
to configure advanced queue properties.

5. Create an Initial Context
An initial context provides applications that connect to WebSphere MQ with a
context they can use to interact with it and a starting point for name
resolution. Without it, an application will be unable to connect to a queue.
HermesJMS can handle connections to the server without using an initial
context, but ReadyAPI needs it to create a direct connection.

To add an initial context:

Right-click JMS Administered Objects and select Add Initial Context.


In the subsequent dialog, select the File System option.

In the Binding directory field, specify the path to an empty folder.

Click Finish.

IMPORTANT: Save the Initial Context Factory and Provider URL values. You
will need these values when you create a plugin or establish a manual
connection.

6. Create a Connection Factory
A connection factory is a Java object that a client uses to create a
connection to the JMS provider. To create it in WebSphere MQ:

Right-click Initial Context > Connection Factories and select New >
Connection Factory.

In the subsequent dialog, specify a name for the connection factory.

IMPORTANT: Save the connection factory name. You will need this value when
you create a plugin or establish a manual connection.

In the Messaging provider drop-down list, select WebSphere MQ.

Click Next > Next.

In the Transport drop-down list, select MQ Client.

Follow the instructions of the wizard.

7. Create Destinations for Queues
Destinations add queues to an initial context so that an application that
connects to WebSphere MQ and gets a context can find them.

Right-click Initial Context > Destinations and select New > Destination.

In the subsequent dialog, specify the destination name.

Click Next > Next.

In the Queue manager field, specify the name of the queue manager you
created earlier.

In the Queue field, specify the name of the queue you created earlier.

Close the dialog. If necessary, create destinations for other queues you
created.

https://www.genericsmartdrugs.com/



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html