You can create new JNDI destination definitions for the
new Routing message endpoint JMS destination with the jndi://<DESTINATION>
format.
Procedure
To create a new JNDI destination, complete the following
steps:
- Create the necessary WebSphere MQ
destination queues for the new Routing message Endpoint JMS Destination. Run the WebSphere MW
runmqsc command to define a local queue, for example:
$runmqsc MB8QMGR
DEFINE QL(<Queue Name>)
END
Where MB8QMGR is the queue manager
name used in this pattern, and <Queue Name> is
the MQ destination queue name.
- Add the JNDI definition for new Routing message Endpoint
destination.
- Edit the JMS.def file located in /home/virtuser/soapolicyjmsdef by
adding the new JNDI definition. In the following example, a new JNDI
definition is added for the JMS Routing message Endpoint
jndi://<DESTINATION>
along
with existing mandatory JNDI definitions: $vi /home/virtuser/soapolicyjmsdef/JMS.def
# Define a QueueConnectionFactory
# Only parameters being overridden from their default values
# are specified.
# This sets up a MQ client binding.
DEF QCF(QCF) +
TRANSPORT(CLIENT) +
QMANAGER(MB8QMGR) +
HOSTNAME(127.0.0.1) +
PORT(2414)
#
DEF Q(REQUEST_IN) +
QUEUE(REQUEST_INQ) +
QMANAGER(MB8QMGR)
DEF Q(REPLY_OUT) +
QUEUE(REPLY_OUTQ) +
QMANAGER(MB8QMGR)
DEF Q(BACKOUT) +
QUEUE(SYSTEM.DEAD.LETTER.QUEUE) +
QMANAGER(MB8QMGR)
# Add new JNDI definition for Route Message Endpoint value
# jndi://<DESTINATION> set in the new policy doc
# Replacing <DESTINATION> and <Destination MQ QueueName>
# values with their actual values.
DEF Q(<DESTINATION>) +
QUEUE(<Destination MQ QueueName>) +
QMANAGER(MB8QMGR)
END
- Save and close the JMS.def file.
- Run the following command to create the bindings definition:
$/opt/mqm/java/bin/JMSAdmin < /home/virtuser/soapolicyjmsdef/JMS.def
This
creates the JNDI bindings definition file in /home/virtuser/JNDI-DIR/.bindings.
What to do next
Share the JMS connection information with external clients.
For more information, see
Sharing JMS connection information with external clients