Using the JMSAdmin Tool
Many institutions do not use file based JNDI to hold JMS objects. This is a simple example which demonstrates the components necessary for the Business Rules to function properly. In this sample, the JMS objects are administered using the JMSAdmin tool provided with WebSphere® MQ.
Open a command window and change to the WebSphere MQ Java™ directory. By default, this directory should be: C:\Program Files\IBM\WebSphere MQ\Java\bin
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JNDI
SECURITY_AUTHENTICATION=none
Make sure all other lines in the file are commented out (all other lines should start with a "#").
Notice the PROVIDER_URL parameter is pointing to the JNDI directory. Create this directory if it does not already exist. This is where the JMSAdmin tool creates the JNDI.bindings file.
InitCtx>
If the InitCtx prompt is not visible, it means there was an error starting the tool. Read the error messages, correct the problem, and restart the tool.
Define a TopicConnectionFactory for each server which will be receiving messages from the Distribution Manager and a TopicConnectionFactory for the Distribution Manager. To define a TopicConnectionFactory, type the following at the InitCtx> prompt:
InitCtx> Define TCF(TCF_Server1) QMGR(qmgrName) CLIENTID(Server1)
- TCF_Server1
- Is a unique name for this TopicConnectionFactory
- qmgrName
- Is the name of the queue manager
- Server1
- Is a unique ID for the server. This should match what is defined for the serverName property in the Business Rules Server configuration file.
Next, run the following command to define a topic object. The Distribution Manager publishes
to a topic of the name IBMPayDir/Server/GetFiles
. This
name must be entered exactly as shown.
InitCtx> Define T(IBMPayDir/Server/GetFiles) TOP(IBMPayDir/Server/GetFiles)
Enter the display CTX command to view a list of the objects that were just defined. If the topic does not display, use the following command:
InitCtx> Display T(IBMPayDir/Server/GetFiles)
This displays the topic details.
jmsUseJNDI = true
jmsURL = file:/C:/JNDI
jmsInitialContext = com.sun.jndi.fscontext.RefFSContextFactory
jmsConnectionFactory = TCF_manager
Notice the jmsURL and jmsInitialContext properties match was specified in the JMSAdmin.config file. If a different provider URL or initial context factory in the JMSAdmin tool is used, those same values must be specified here. The jmsConnectionFactory property should match the name used when the TopicConnectionFactory with the JMSAdmin tool is defined.
strmqbrk -m qmgrName
The Distribution Manager or Business Rules Server is now ready to be started.