background image

ant deploy Command

<< Running the sendremote Modules Using Ant | ant undeploy Command >>
<< Running the sendremote Modules Using Ant | ant undeploy Command >>

ant deploy Command

To deploy the replybean module on the local and remote servers, perform the following steps:
1. Verify that you are still in the directory replybean.
2. Type the following command:
ant deploy
Ignore the message that states that the application is deployed at a URL.
3. Type the following command:
ant deploy-remote -Dsys=
remote-system-name
Replace remote-system-name with the actual name of the remote system.
To deploy and run the client, perform these steps:
1. Change to the directory multiclient:
cd ../multiclient
2. Type the following command:
ant run
On the local system, the output looks something like this:
running application client container.
Sent message: text: id=1 to local app server
Sent message: text: id=2 to remote app server
ReplyListener: Received message: id=1, text=ReplyMsgBean processed message: text: id=1 to local
app server
Sent message: text: id=3 to local app server
ReplyListener: Received message: id=3, text=ReplyMsgBean processed message: text: id=3 to local
app server
ReplyListener: Received message: id=2, text=ReplyMsgBean processed message: text: id=2 to remote
app server
Sent message: text: id=4 to remote app server
ReplyListener: Received message: id=4, text=ReplyMsgBean processed message: text: id=4 to remote
app server
Sent message: text: id=5 to local app server
ReplyListener: Received message: id=5, text=ReplyMsgBean processed message: text: id=5 to local
app server
Sent message: text: id=6 to remote app server
ReplyListener: Received message: id=6, text=ReplyMsgBean processed message: text: id=6 to remote
app server
Sent message: text: id=7 to local app server
ReplyListener: Received message: id=7, text=ReplyMsgBean processed message: text: id=7 to local
app server
Sent message: text: id=8 to remote app server
An Application Example That Deploys a Message-Driven Bean on Two Servers
Chapter 32 · Java EE Examples Using the JMS API
993