Java Reference
In-Depth Information
Reading message: This is message 2 from producer
Reading message: This is message 3 from producer
To Build and Package the Clients for the Synchronous Receive Example Using Ant
1. In a terminal window, go to the
producer
directory:
cd producer
2. Type the following command:
ant
3. In a terminal window, go to the
synchconsumer
directory:
cd ../synchconsumer
4. Type the following command:
ant
The targets place the application client JAR file in the
dist
directory for each ex-
ample.
To Deploy and Run the Clients for the Synchronous Receive Example Using Ant and the
appclient
Command
You can run the clients using the
appclient
command. The
build.xml
file for each
project includes a target that creates resources, deploys the client, and then retrieves the
client stubs that the
appclient
command uses. Each of the clients takes one or more
command-line arguments: a destination type and, for
Producer
, a number of messages.
To build, deploy, and run the
Producer
and
SynchConsumer
examples using Ant and
the
appclient
command, follow these steps.
To run the clients, you need two terminal windows.
1. In a terminal window, go to the
producer
directory:
cd ../producer
2. Create any needed resources, deploy the client JAR file to the GlassFish Serv-
er, then retrieve the client stubs:
ant getclient
Ignore the message that states that the application is deployed at a URL.