Java Reference
In-Depth Information
Click here to view code image
Destination type is topic
Sending message: This is message 1 from producer
Sending message: This is message 2 from producer
Sending message: This is message 3 from producer
5. On jupiter , run SynchConsumer . Follow these steps:
a. Right-click the synchconsumer project and select Properties.
b. Select Run from the Categories tree.
c. In the Arguments field, type the following:
queue
d. Click OK.
e. Right-click the project and select Run.
The output of the program looks like this (along with some additional output):
Click here to view code image
Destination type is queue
Reading message: This is message 1 from producer
Reading message: This is message 2 from producer
Reading message: This is message 3 from producer
To Run the Clients Using Ant and the appclient Command
These steps assume you have the tutorial installed on both of the systems you are using
and that you are able to access the file system of jupiter from earth or vice versa.
You will edit the source files to specify the new connection factory. Then you will rebuild
and run the clients.
1. To edit the source files, follow these steps:
a. On earth , open the following file in a text editor:
tut-install /examples/jms/simple/producer/src/java/Produ-
cer.java
b. Find the following line:
@Resource(lookup = "jms/ConnectionFactory")
c. Change the line to the following:
@Resource(lookup = "jms/JupiterConnectionFactory")
Search WWH ::




Custom Search