Sie sind auf Seite 1von 24

Websphere MQ as JMS provider for

WAS 6.x

1
Version:
Document Version Date of Creation Name of Author Remarks

1.0 20-March -2008 Rupali Bora Draft Document

1.1 20-March -2008 Ashish Bhan Review Document

2
Contents:
Websphere MQ as JMS provider for WAS 6.x………………………………..1
Contents:…………………………………………………………………………….............3
1. Configure WebSphere MQ 6.0……………………………………….............4
2. Configure WebSphere MQ for publish/subscribe..………..............6
3. Configure the application server………………………………………..........6
4. Set Environment Variables………………………………………..................19
5 .Placing jar files in WMQ Folder ………………………………………..........20
6. Setting setupCmdLine.bat file ………………………………………...........21

3
1. Configure WebSphere MQ 6.0

In the WebSphere MQ Explorer:

1) Create the queue manager and queue:

a. Navigate to the Queue Managers folder.

b. Create a new queue manager named QMGR with the default settings
(Right click on Queue Managers ->New->Queue Manager) (Fig 1 )

Figure 1. New queue manager and local queue

4
3. Navigate to the Queues folder for QMG. Create a new local queue named
EXAMPLE.Q with the default settings.

Figure 2. New local queue

2. Configure WebSphere MQ for publish/subscribe


1. Define the JMS publish/subscribe administration queues:

5
C:\WebSphere MQ\bin> runmqsc QMGR < ..\Java\bin\MQJMS_PSQ.mqsc

2. Start the broker and confirm that it is running:

C:\WebSphere MQ\bin> strmqbrk -m QMGR


MQSeries Publish/Subscribe broker started for queue manager QMGR.

C:\WebSphere MQ\bin> dspmqbrk -m QMGR


MQSeries Publish/Subscribe broker for queue manager QMGR running.

3. Configure the application server


- Start the server

- View the WebSphere MQ messaging provider panel :

- In the administrative console, navigate to Resources => JMS


Providers => WebSphere MQ to display the main WebSphere MQ
messaging provider panel

1) Define the JMS connection factory

a) We need to define the JMS connection factory our code will use to get JMS
connections to WebSphere MQ.
b) In the Additional Properties section of the dialog select WebSphere MQ
connection factories to display the WebSphere MQ connection factories
panel .
c) Press the New button. On the next panel, enter or select the following values:

Figure 3. WebSphere MQ connection factories

6
7
8
d) Press Apply and then Save.

2) Define the JMS queue :

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.

9
10
d) On the next panel, enter or select the following values:

Figure 4. WebSphere MQ queue destinations

e )Press Apply and then Save

11
12
3) Define the JMS topic:

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


messaging provider panel.
b. In the Additional Properties section, select WebSphere MQ topic
destinations to display the WebSphere MQ topic destinations panel.
c. Press the New button.
d. On the New WebSphere MQ topic destinations panel enter or select the
following values:

13
Figure 5. WebSphere MQ topic destinations

e. Press Apply and then Save

14
4) Define the listener ports

15
i) JMSExampleQueuePort
ii) JMSExampleTopicPort.

a. In the administrative console, navigate to Servers => Application


Servers ->server1

b. In the Communications section, navigate to Messaging => Message


Listener Service, then select Listener Ports.

Figure 6. Application server configuration panel

16
17
c. On the Listener Ports panel, press the New button.
d. On the New listener port panel , enter or select the following values:

Figure 7. New listener port

18
19
e) Press Apply and then Save

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

20
4. Set Environment Variables:
Environment->Websphere Variables

21
Figure 8. Setting Websphere Variables

22
5 .Place the following jar files in WMQ Folder

6. Setting setupCmdLine.bat file

SET WAS_CLASSPATH=%WAS_HOME%\properties;%WAS_HOME%\lib\bootstrap.jar;
%WAS_HOME%\lib\j2ee.jar;%WAS_HOME%\lib\lmproxy.jar;%WAS_HOME%\lib\urlprotocols.jar;
C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\com.ibm.mq.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\com.ibm.mqjms.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\connector.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\fscontext.jar;C:\Program

23
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jms.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jndi.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jta.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\ldap.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\messagingClient.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\providerutil.jar;

SET WAS_PATH=%WAS_HOME%\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; C:\Program


Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\com.ibm.mq.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\com.ibm.mqjms.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\connector.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\fscontext.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jms.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jndi.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\jta.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\ldap.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\messagingClient.jar;C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib\WMQ\providerutil.jar;%PATH%

Note : The class path may vary as per your environment Settings

24

Das könnte Ihnen auch gefallen