The Java EE 5 Tutorial

Creating JMS Administered Objects for the Synchronous Receive Example

Creating the JMS administered objects for this section involves the following:

If you built and ran the SimpleMessage example in Chapter 23, 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, do the following:

  1. In a terminal window, go to the producer directory:

    cd producer
  2. 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:

Command list-jms-resources executed successfully.