Java Reference
In-Depth Information
d. Save and close the file.
e. On
jupiter
, open the following file in a text editor:
tut-install
/examples/jms/simple/synchconsumer/src/java/
SynchConsumer.java
f. Repeat Step b and Step c, then save and close the file.
2. To recompile and repackage the
Producer
example on
earth
, type the fol-
lowing:
ant
3. To recompile and repackage the
SynchConsumer
example on
jupiter
, go
to the
synchconsumer
directory and type the following:
ant
4. On
earth
, deploy and run
Producer
. Follow these steps:
a. On
earth
, from the
producer
directory, create any needed resources,
deploy the client JAR file to the GlassFish Server, then retrieve the client
stubs:
ant getclient
Ignore the message that states that the application is deployed at a URL.
b. To run the client, type the following:
appclient -client client-jar/producerClient.jar queue 3
The output looks like this (along with some additional output):
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. From the
synchconsumer
directory, create any needed resources, deploy
the client JAR file to the GlassFish Server, then retrieve the client stubs:
ant getclient