background image

Running the consumeremote Modules Using Ant

<< Building the consumeremote Modules | Deploy the earthmdb Module >>
<< Building the consumeremote Modules | Deploy the earthmdb Module >>

Running the consumeremote Modules Using Ant

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
Undeploy the message-driven bean after you finish running the client. To undeploy the
earthmdb
module, perform these steps:
1. Click the Runtime tab.
2. Expand the Servers node.
3. Expand the Sun Java System Application Server node.
4. Expand the Applications node.
5. Expand the EJB Modules node.
6. Right-click earthmdb and choose Undeploy.
To remove the generated files, follow these steps:
1. Right-click the earthmdb project and choose Clean Project.
2. In the command line window from which you copied the client JAR file, go to a directory
other than the jupiterclient/dist directory.
3. Right-click the jupiterclient project and choose Clean Project.
You can also delete the jupiterclient.jar file from the remote filesystem.
Building, Deploying, and Running the consumeremote
Modules Using Ant
To package the modules using Ant, perform these steps:
1. Go to the following directory:
tut-install/javaeetutorial5/examples/jms/consumeremote/earthmdb/
2. Type the following command:
ant
This command creates a JAR file that contains the bean class file and the sun-ejb-jar.xml
deployment descriptor file.
3. Go to the jupiterclient directory:
An Application Example That Consumes Messages from a Remote Server
Chapter 32 · Java EE Examples Using the JMS API
983