Before you can run an application that connects to a WebSphere MQ queue manager, you must configure
the queue manager. For a publish/subscribe application,
some additional configuration is required.
Before you begin
Before starting this task, you must do the following:
- Make sure that your application has access to a queue manager that
is running.
- If your application is a publish/subscribe application,
make sure that it also has access to a broker that is running.
- Make sure that your application uses a connection factory whose properties
are set appropriately to connect to the queue manager.
If your application is a publish/subscribe application,
make sure that the appropriate connection factory properties are set for using
the broker. For more information about the properties of a connection factory,
see Properties of ConnectionFactory.
Why and when to perform this task
You configure the
queue manager and
broker to run
XMS applications
in the same way that you configure the
queue manager and
broker to run
WebSphere MQ JMS applications.
The following steps summarize what you need to do:
Steps for this task
- On the queue manager,
create the queues that your application needs.
For information
about how to do this, see the WebSphere MQ System
Administration Guide.
If your application is a publish/subscribe application
that needs access to WebSphere MQ JMS system
queues, wait until Step 4.a before creating
the queues.
- Grant the user ID associated with your application the authority
to connect to the queue manager and
the appropriate authorities to access the queues.
For information
about how to do this, see the WebSphere MQ System
Administration Guide. If your application connects to the queue manager in
client mode, see also WebSphere MQ Clients or WebSphere MQ Security.
- If your application connects to the queue manager in client mode,
make sure that a server connection channel is defined at the queue manager and
that a listener has been started.
For information about how
to do this, see WebSphere MQ Clients.
You
do not need to perform this step for each application that connects to the queue manager. One server connection
channel definition and one listener can support all the applications that
connect in client mode.
- If your application is a publish/subscribe application,
perform the following steps.
These steps assume
that your application and the broker connect to the same queue manager.
If your application and the broker connect to different queue managers, see WebSphere MQ Using Java for
the additional configuration that is required.
- On the queue manager,
create the WebSphere MQ JMS system
queues by running the script of MQSC commands supplied with WebSphere MQ.
Make sure that the user ID associated with the broker has the authorities
it needs to access the queues.
For information about where to
find the script and how to run it, see WebSphere MQ Using
Java.
You need to perform this step only once for the queue manager.
The same set of WebSphere MQ JMS system
queues can support all XMS and WebSphere MQ JMS applications
that connect to the queue manager and
use the broker.
- Grant the user ID associated with your application the authorities
it needs to access the WebSphere MQ JMS system
queues.
For information about what authorities the user ID needs,
see WebSphere MQ Using
Java.
- For a broker of WebSphere
Business Integration Event Broker or WebSphere Business
Integration Message Broker, create and deploy
a message flow to service the queue where applications send messages that
they publish.
The basic message flow comprises an MQInput message
processing node to read the published messages and a Publication message processing
node to publish the messages.
For information about how create and deploy
a message flow, see the WebSphere
Business Integration Event Broker or WebSphere Business
Integration Message Broker Information Center.
You
do not need to perform this step if a suitable message flow is already deployed
at the broker.
Result
You can now start your application.