The Java EE 6 Tutorial

ProcedureTo Create 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 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.

  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.

  3. 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.