Java Reference
In-Depth Information
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 NetBeans IDE:
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")
d. Save the file.
e. On jupiter , open the following file in NetBeans IDE:
tut-install /examples/jms/simple/synchconsumer/src/java/
SynchConsumer.java
f. Repeat Step b and Step c, then save the file.
2. To recompile and repackage the Producer example on earth , right-click
the producer project and select Clean and Build.
3. To recompile and repackage the SynchConsumer example on jupiter ,
right-click the synchconsumer project and select Clean and Build.
4. On earth , deploy and run Producer . Follow these steps:
a. Right-click the producer project and select Properties.
b. Select Run from the Categories tree.
c. In the Arguments field, type the following:
queue 3
d. Click OK.
e. Right-click the project and select Run.
The output looks like this (along with some additional output):
Search WWH ::




Custom Search