The Java EE 6 Tutorial

ProcedureTo Build, Package, Deploy, and Run durablesubscriberexample Using Ant

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

    tut-install/examples/jms/advanced/durablesubscriberexample/
    
  2. If you did not do so for A Message Acknowledgment Example, create a connection factory named jms/DurableConnectionFactory:


    ant create-durable-cf
    
  3. To compile and package the client, type the following command:


    ant
    
  4. To deploy the client JAR file to the GlassFish Server, then retrieve the client stubs, type the following command:


    ant getclient
    

    Ignore the message that states that the application is deployed at a URL.

  5. Because this example takes no command-line arguments, you can run the client using the following command:


    ant run
    

    Alternatively, you can type the following command:


    appclient -client client-jar/durablesubscriberexampleClient.jar
    
  6. After you run the client, you can delete the connection factory jms/DurableConnectionFactory. Go to the directory tut-install/examples/jms/advanced/durablesubscriberexample/ and type the following command:


    ant delete-durable-cf