Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Coding Messaging Client Applications | A Basic JMS Sender-Receiver Client | Configuring the Administered Objects and Running the Client | Administrative Setup Commands
Administrative Setup Commands
The following sections use the webMethods Broker JMSAdmin command-line tool to set up the client. The commands locate the JNDI properties file and the JNDI context, bind the objects, create a topic and subscription, and set permissions for the sender and receiver applications.
Following is the complete sequence of JMSAdmin commands that you would use to set up the example in this chapter, including any messages JMSAdmin directs to the console. The numbered labels identify lines of code that are described in more detail in the table that follows.
[1] jmsadmin -p
Connected to JNDI Context: ou=jmsdept,ou=pd,o=wm
[2] > bind cf aSenderFactory with group=SampleSenders
> bind cf aReceiverFactory with group=SampleReceivers
> bind topic aTopic with topicName=Samples::RequestInfo
[3] > connect
Connected to Broker #1 on localhost:6849
[4] > create topic for aTopic
[5] > create group SampleSenders
> permit group SampleSenders to publish Samples::RequestInfo
> create group SampleReceivers
> permit group SampleReceivers to subscribe Samples::RequestInfo
[6] > end
Start JMSAdmin using a properties filename. The tool connects to JNDI with the configuration properties specified in the sample properties file.
Bind connection factories into a JNDI context for the sender and receiver applications, and assign them to a Broker group.
Note that the connection factory names must be different for the two applications. The last bind command binds the topic to which the message will be delivered into a subcontext. For more information, see Bind TopicConnectionFactory and Bind Topic.
Connect to the Broker.
Using the connect command without parameters starts a connection to the default Broker on the default server (localhost on port 6849), as indicated by the message shown after the connection is made. For more information, see Connect.
Create the topic used by the sender and receiver applications.
You can only use create topic after a connection to the Broker has been established. For more information, see Create Topic.
Create groups for the sender and receiver applications and assign them the appropriate Broker publish and subscribe access permissions. For more information, see Create Group and Permit.
End the JMSAdmin session using the end command.