Uday's Blog

February 26, 2010

Create JNDI bindings for WMQ

Filed under: Technical — ugoud @ 12:05 pm

The page describes about how to create jndi bindings files Websphere MQ.

The environment used to describe is as follows:

OS : Windows XP SP3
Websphere MQ: V6.0
Java: 1.6

Once Websphere MQ refered as WMQ from here onwards is installed navigate to the WMQ installation folder from command prompt.
Navigate to <WMQ Install location>\bin and execute the following commands

Create a queue manager

 crtmqm -q JMS_QUEUE_MANAGER

Start queue manager

 strmqm JMS_QUEUE_MANAGER

Open mq command line environment

runmqsc

Define a local queue in mq command line

define qlocal(JMS_QUEUE)
end

Create a configuration file with contents

INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:
SECURITY_AUTHENTICATION=none

Navigate to <WMQ Install location>\Java\bin

Open JMSAdmin tool

 JMSAdmin.bat -v -cfg 

The above command opens JMSAdmin tool environment

Define JMS bindings for Connection factory by executing

define qcf(jms/testJMSQCF) qmgr(JMS_QUEUE_MANAGER)

JNDI name for the Connection factory will be “jms/testJMSQCF”

Define JMS binding for Queue by executing

define q(jms/testJMSQ) qmgr(JMS_QUEUE_MANAGER) queue(JMS_QUEUE)
end

JNDI name for the Queue will be “jms/testJMSQ”

This will create a .bindings file at location specified in the configuration file.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: