82 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
5.3 WebSphere MQ configuration
Some preparation is required for the message flow. The preparation includes
creating the WebSphere MQ queues and the JNDI entries that are required for
the JMSInput node.
5.3.1 Local queues on the broker queue manager
The message flow requires the following local queues on the broker queue
manager:
? SC1.INPUTQ
? SC1.BACKOUTQ
? Q1
? Q2
? Q3
? TRYCATCHQ
? HOLDINGQ_MSGS_WITH_DB_ACCESS_ISSUES
? HOLDINGQ_MSGS_WITH_INVALID_DESTINATIONS
The queues were created using the MQSC commands in Example 5-1.
Example 5-1 MQSC commands to create the queues
runmqsc WBRK6_DEFAULT_QUEUE_MANAGER
define qlocal (SC1.INPUTQ) replace
define qlocal (SC1.BACKOUTQ) replace
define qlocal (Q1) replace
define qlocal (Q2) replace
define qlocal (Q3) replace
define qlocal (TRYCATCHQ) replace
define qlocal (HOLDINGQ_MSGS_WITH_DB_ACCESS_ISSUES) replace
define qlocal (HOLDINGQ_MSGS_WITH_INVALID_DESTINATIONS) replace
end
5.3.2 JMS entries
The message flow uses a JMSInput node and requires a JNDI queue connection
factory and queue entries for that point to the physical queue manager and MQ
queues.
MQ queue name: The MQ queue name must be exactly the same as the
JNDI name defined in the JNDI bindings file.
Chapter 5. Scenario: Message splitting and routing 83
We used the following steps to create these JNDI definitions:
1. Edit the MQ_Install_DirJavainJMSAdmin.config file and ensure that the
following two lines are uncommented in the file:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JNDI-Directory
Comment out the other INITIAL_CONTEXT_FACTORY and PROVIDER_URL lines.
2. The folder specified as PROVIDER_URL must exist on the system. Create
the folder or change PROVIDER_URL to use an existing folder.
PROVIDER_URL=file:/C:/Scenario1JNDI-Directory
3. Put the definitions shown in Example 5-2 in the
C:Scenario1JNDI-DirectorycreateJNDI.defs file.
Example 5-2 The createJNDI.defs script
# Define a QueueConnectionFactory
# Only parameters being overridden from their default values are
specified.
# This sets up a MQ client binding.
DEF QCF(SC1_QCF) +
TRANSPORT(CLIENT) +
QMANAGER(WBRK6_DEFAULT_QUEUE_MANAGER) +
HOSTNAME(localhost) +
PORT(2414)
# Define a Queue Destination
DEF Q(SC1.INPUTQ) +
QUEUE(SC1.INPUTQ) +
QMANAGER(WBRK6_DEFAULT_QUEUE_MANAGER)
# Backout Queue
DEF Q(SC1.BACKOUTQ) +
QUEUE(SC1.BACKOUTQ) +
QMANAGER(WBRK6_DEFAULT_QUEUE_MANAGER)
END
4. Execute the following commands:
cd MQ_Install_DirJavain
JMSAdmin < C:Scenario1JNDI-DirectorycreateJNDI.defs
5. The following commands confirm that the command ran correctly:
JMSAdmin
dis ctx
84 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
These two commands should give you results similar to those that are shown
in Figure 5-2.
Figure 5-2 Successful creation of JNDI definitions
6. The WebSphere MQ client classes must be made available to the broker.
Copy the Java.jar files and any native libraries for the JMS provider client from
MQ_Install_DirJavalib into the broker shared-classes directory. For example,
on a Microsoft® Windows® system, the directory typically has the following
format:
C:Documents and SettingsAll UsersApplication
DataIBMMQSIshared-classes
Copying the files into the shared-classes directory ensures that the Java class
path for the JMS nodes is set correctly.
For additional information about connecting JMS transport nodes, refer to the
article “Connecting the JMS Transport Nodes for WebSphere Message Broker v6
to Popular JMS Providers” on the Web at:
http://www.ibm.com/developerworks/websphere/library/techarticles/0610_b
icheno/0610_bicheno.html
5724-H72, 5655-L82, 5724-L26 (c) Copyright IBM Corp. 2002,2005.
All Rights Reserved.
Starting WebSphere MQ classes for Java(tm) Message Service
Administration
InitCtx> dis ctx
Contents of InitCtx
.bindings java.io.File
createJNDI.defs java.io.File
a SC1.BACKOUTQ com.ibm.mq.jms.MQQueue
a SC1.INPUTQ com.ibm.mq.jms.MQQueue
a SC1_QCF
com.ibm.mq.jms.MQQueueConnectionFactory
5 Object(s)
0 Context(s)
5 Binding(s), 3 Administered
InitCtx>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.105.105