background image

Compile and Package the Program

<< Transactions JMS Client Example | The transactedexample JAR >>
<< Transactions JMS Client Example | The transactedexample JAR >>

Compile and Package the Program

Before you run the program, do the following:
1. In a terminal window, go to the following directory:
tut-install/javaeetutorial5/examples/jms/advanced/transactedexample/
2. Create the necessary resources using the following command:
ant create-resources
This command creates three destination resources with the names jms/AQueue,
jms/BQueue
, and jms/CQueue, all of type javax.jms.Queue, and one destination resource
with the name jms/OTopic, of type javax.jms.Topic.
3. To compile and package the program using NetBeans IDE, follow these steps:
a. In NetBeans IDE, choose Open Project from the File menu.
b. In the Open Project dialog, navigate to
tut-install/javaeetutorial5/examples/jms/advanced/.
c. Select the transactedexample folder.
d. Select the Open as Main Project check box.
e. Click Open Project Folder.
f. Right-click the project and choose Build Project.
To compile and package the program using Ant, follow these steps:
a. Go to the following directory:
tut-install/javaeetutorial5/examples/jms/advanced/transactedexample/
b. Type the following command:
ant
To run the program using NetBeans IDE, follow these steps:
1. Right-click the transactedexample project and choose Properties.
2. Select Run from the Categories tree.
3. In the Arguments field, type a number that specifies the number of computers to order:
3
4. Click OK.
5. Right-click the project and choose Run Project.
Creating Robust JMS Applications
The Java EE 5 Tutorial · September 2007
952