MQ Server Conf

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 19

1.

MQ Server & Websphere Integration - Illustration

The figure below shows a high level view of the function of a WebSphere MQ link: it allows messages to be
exchanged between a WebSphere Application Server and a WebSphere MQ network

A WebSphere MQ link is a configurable object that describes the attributes required to connect
to, and send or receive messages to or from, a WebSphere MQ queue manager. It is an
administrative entity in WebSphere Application Server, not in WebSphere MQ. A WebSphere
MQ link connects to a specific foreign bus which represents a WebSphere MQ network. A
WebSphere MQ link is defined on a WebSphere Application Server messaging engine in a
service integration bus. The messaging engine that supports the WebSphere MQ link is known
as the WebSphere MQ link engine.

The WebSphere MQ link engine inside the WebSphere Application Server can exchange
messages with a WebSphere MQ queue manager. To the WebSphere MQ link engine, the
WebSphere MQ queue manager appears to be a foreign bus. To the queue manager, the
WebSphere MQ link engine appears to be another WebSphere MQ queue manager.

The figure below shows a bus on a WebSphere Application server and how a messaging engine
on the bus can have a WebSphere MQ link. WebSphere MQ appears as a foreign bus with a
gateway queue manager with a connection to the WebSphere MQ link.

Exchanging messages between a service integration bus, and a foreign bus in a WebSphere MQ
network
WebSphere MQ link can have definitions for a WebSphere MQ link sender or a WebSphere MQ
link receiver or both. The link sender and receiver emulate the behavior of WebSphere MQ
sender and receiver channels

Exchanging messages between alias destinations, foreign destinations and remote queues.
Configuring MQ Server

Step 1
Install MQ 6.0

Step 2
a) Create Queue Manager
STEP 3
Configuration at Websphere Server Level
Define the JMS connection factory:-
We need to define the JMS connection factory our code will use to get JMS connections to WebSphere MQ.
In the Additional Properties section of the dialog

WebSphere MQ connection factories


Define the JMS queue:-

We need to define the JMS queue that our code will use to perform point-to-point
messaging using WebSphere MQ:

a. In the Administrative console, navigate again to the WebSphere MQ messaging


provider panel.
b. In the Additional Properties section, select WebSphere MQ queue destinations.
c. On the WebSphere MQ queue destinations panel, press the New button.
d. On the next panel, enter or select the following values:

Accept the default values for all of the other settings. Specifically, if Base queue manager name is left
blank, its default value will be the Queue manager value of the connection factory used to connect to the
queue.
Define the listener ports:-

Our sample code requires two listener ports, which we need to define in the server:

 JMSExampleQueuePort
In the Application servers panel, click on server1, which is the link for your server (the server is named
server1 by default.) to display the Application server configuration panel
 At the bottom of the panel, press Apply to submit the changes.

 Follow steps a through f again to create a second listener port with these settings:

 Save your changes to the server's configuration files by selecting the Save link, then the Save button.
 Log out of the aministrative console and close the browser.
Deploy and restart:-
Now that the server is configured, we are almost ready to deploy and test the application. First, though,
restart the server so that it runs with the configuration changes. (You can restart the server, then deploy the
application, but then you won't see the application startup messages in the Console view or in
SystemOut.log when you restart the server.)
Deploy the application

To add our JMSExample application to the server:

a. If you are using Rational Application Developer:


1. Go to the Servers view, select the server, then Add and remove projects... from the pop-
up menu.
2. In the Add and Remove Projects dialog, add JMSExample to the list of configured
projects, then press Finish. By associating the enterprise project with the server in this
way, not only is the project deployed to the server, but future code changes in the project
will automatically become available when you restart the server.
Restart the server:-

You need to stop and start the server so it can re-read the configuration files we changed and run with the
new configuration:

Test the application:-

So far, we have configured the server, deployed the application, and successfully restarted the server. Now,
we will test our application using the Universal Test Client (UTC), an IBM tool included with Rational
Application Developer, the Application Server Toolkit (ASTK), and WebSphere Application Server. We
will use the UTC to run our stateless session bean, and then watch System.out to see what the MDBs do.

In Rational Application Developer, we will run MessageProducerSSBBean on our server, which will open
the UTC on an instance of the bean's home that is running in the server. To do this:

a. From the Project Explorer, navigate to EJB Projects => JMSExampleEJB => Deployment
Descriptor: JMSExampleEJB => Session Beans => MessageProducerSSB.
b. Right-click on the bean, then select Run => Run on server...
For the first test, we will send a test message point-to-point and confirm that it is received successfully:

a. In the UTC navigation panel, navigate to EJB Beans => MessageProducerSSBLocal =>
MessageProducerSSBLocalHome => MessageProducerSSBLocal create().

 Select the home's create() method.


 In the Parameters panel, click the Invoke button.

 In the Results panel, you will notice that an instance named MessageProducerSSBLocal 1 has been
created. Press Work with Object to add the instance to the EJB Beans list.

 Under MessageProducerSSBLocal 1 in the EJB Beans list, select the bean's sendMessage(String)
method.
 The Parameters panel now contains fields and a button for invoking sendMessage(String) on the
stateless session bean. (We are getting ready to send a JMS message, so be sure you can see the text at the
bottom of the Console view, or at the end of the SystemOut.log file.)

 For the String parameter, in the Value field, enter some simple text for testing, such as test queue
123, then Invoke.

APPENDIX

Link for Reference:-


WebSphere MQ link sender

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0002_.html

Configure WAS for MQ.


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Configuring foreign bus definitions:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Multiple bus topology:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Point to point messaging across multiple buses:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Viewing the status of a WebSphere MQ link and its components


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Service integration bus:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Securing connections to a WebSphere MQ network:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

The service integration environment backup:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsptopic=/com.ibm.websphere.pmc.express.do
c/concepts/cjc0001_.html

Restoring a data store and recovering its messaging engine:-


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?
topic=/com.ibm.websphere.pmc.express.doc/concepts/cjc0001_.html

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy