background image

Deploy the earthmdb Module

<< Running the consumeremote Modules Using Ant | Deploys a Message-Driven Bean on Two Servers >>
<< Running the consumeremote Modules Using Ant | Deploys a Message-Driven Bean on Two Servers >>

Deploy the earthmdb Module

cd ../jupiterclient
4. Type the following command:
ant
This target creates a JAR file that contains the client class file and a manifest file.
To deploy the earthmdb module, perform these steps:
1. Change to the directory earthmdb:
cd ../earthmdb
2. Type the following command:
ant deploy
To copy the jupiterclient module to the remote system, perform these steps:
1. Change to the directory jupiterclient/dist:
cd ../jupiterclient/dist
2. Type a command like the following:
cp jupiterclient.jar F:/
That is, copy the client JAR file to a location on the remote filesystem.
To run the client, perform the following steps:
1. Go to the directory on the remote system (jupiter) where you copied the client JAR file.
2. Use the following command:
appclient -client jupiterclient.jar
On jupiter, the output of the appclient command looks like this:
Sending message: This is message 1
Sending message: This is message 2
Sending message: This is message 3
On earth, the output in the server log looks something like this (wrapped in logging
information):
MESSAGE BEAN: Message received: This is message 1
MESSAGE BEAN: Message received: This is message 2
MESSAGE BEAN: Message received: This is message 3
An Application Example That Consumes Messages from a Remote Server
The Java EE 5 Tutorial · September 2007
984