Java Reference
In-Depth Information
To Run ackequivexample Using Ant
1. In a terminal window, go to the following directory:
tut-install /examples/jms/advanced/ackequivexample/
2. To compile and package the client, type the following command:
ant
3. To create needed resources, 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.
4. Because this example takes no command-line arguments, you can run the cli-
ent using the following command:
ant run
Alternatively, you can type the following command:
appclient -client client-jar/ackequivexampleClient.jar
The client output looks something like this (along with some additional output):
Click here to view code image
Queue name is jms/ControlQueue
Queue name is jms/Queue
Topic name is jms/Topic
Connection factory name is jms/DurableConnectionFactory
SENDER: Created client-acknowledge session
SENDER: Sending message: Here is a client-acknowledge message
RECEIVER: Created client-acknowledge session
RECEIVER: Processing message: Here is a client-acknowledge mes-
sage
RECEIVER: Now I'll acknowledge the message
SUBSCRIBER: Created auto-acknowledge session
SUBSCRIBER: Sending synchronize message to control queue
PUBLISHER: Created auto-acknowledge session
PUBLISHER: Receiving synchronize messages from control queue;
count = 1
PUBLISHER: Received synchronize message; expect 0 more
PUBLISHER: Publishing message: Here is an auto-acknowledge mes-
sage 1
PUBLISHER: Publishing message: Here is an auto-acknowledge mes-
Search WWH ::




Custom Search