Java Reference
In-Depth Information
d. Select the Open as Main Project check box.
e. Click Open Project.
f. In the Projects tab, right-click the project and select Build.
2. To run the client, right-click the ackequivexample project and select Run.
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 mes-
sage
RECEIVER: Created client-acknowledge session
RECEIVER: Processing message: Here is a client-acknowledge
message
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
message 1
PUBLISHER: Publishing message: Here is an auto-acknowledge
message 2
SUBSCRIBER: Processing message: Here is an auto-acknowledge
message 1
PUBLISHER: Publishing message: Here is an auto-acknowledge
message 3
SUBSCRIBER: Processing message: Here is an auto-acknowledge
message 2
SUBSCRIBER: Processing message: Here is an auto-acknowledge
message 3
3. After you run the client, you can delete the destination resource jms/Con-
trolQueue by using the following command:
asadmin delete-jms-resource jms/ControlQueue
You will need the other resources for other examples.
Search WWH ::




Custom Search