Creating the JMS administered objects for this section involves the following:
Creating a connection factory
Creating two destination resources
If you built and ran the simplemessage example in Chapter 17, A Message-Driven Bean Example and did not delete the resources afterward, you need to create only the topic resource.
You can create these objects using the Ant tool. To create all the resources, follow these steps.
In a terminal window, go to the producer directory:
cd producer |
To create all the resources, type the following command:
ant create-resources |
To create only the topic resource, type the following command:
ant create-topic |
These Ant targets use the asadmin create-jms-resource command to create the connection factory and the destination resources.
To verify that the resources have been created, use the following command:
asadmin list-jms-resources |
The output looks like this:
jms/Queue jms/Topic jms/ConnectionFactory Command list-jms-resources executed successfully. |