We will now create and add a destination object to the object store. Since you have created a Queue Connection Factory object, you will want to create the corresponding Queue destination object. The way to create a Queue destination object is very similar to the way that you have created the Queue Connection Factory object.
To create and add a Queue object, do the following.
Figure 8: Add Destination Object
The Lookup Name is the only required field. Like the Lookup Name for the Queue Connection Factory object, you will want to take note of it, since it will be later referenced in the JMS client application. In this tutorial, we will use myQueue for the Lookup Name.
If you do not provide the Destination Name or Destination Description, jmqadmin will provide default values. However, the broker references destinations by Destination Names, so it is recommended that you use a meaningful name. In this tutorial, we use "my_test_queue" for the Destination Name and "This is my test queue" for the Destination Description.
It is very important that you understand the relationship between the
destination object that you create using jmqadmin and the physical destination
on the broker. The destination object that you create using jmqadmin
is an object that encapsulates information about the destination
on a broker. Using a destination object does not necessarily mean
that you can produce and consume messages on that destination on a broker,
if the autocreate mode is off. See Disabling
the autocreate Feature section for details on the autocreate feature.
This is the reason
why you can create destination objects independently from the existence
of the broker. In order to successfully produce and consume messages
the broker, the physical destination that is being referred to by the destination
object should exist on the broker. It is the administrator's responsibility
to manage them.
Tips for LDAP Users:
Use cn=myQueue for the Lookup Name if you are using the
LDAP directory server for the object store.
Tips using jmqobjmgr:
If you want to use jmqobjmgr to create the Queue destination object,
execute the following command.
jmqobjmgr add -t q -l myQueue
-o "JMQDestinationName=my_test_queue"
-o "JMQDestinationDescription=This is my test queue"
-j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory"
-j "java.naming.provider.url=file:///d:/mytemp"
<<Back << >> Next>> <<Return to TOC>>