Java Reference
In-Depth Information
The example uses three queues named jms/AQueue , jms/BQueue , and jms/
CQueue , and one topic named jms/OTopic .
You can use either NetBeans IDE or Ant to build, package, deploy, and run transacte-
dexample .
To Run transactedexample Using NetBeans IDE
1. In a terminal window, go to the following directory:
tut-install /examples/jms/advanced/transactedexample/
2. To compile and package the client, follow these steps:
a. From the File menu, choose Open Project.
b. In the Open Project dialog, navigate to:
tut-install /examples/jms/advanced/
c. Select the transactedexample folder.
d. Select the Open as Main Project check box.
e. Click Open Project.
f. In the Projects tab, right-click the project and select Build.
3. To deploy and run the client, follow these steps:
a. Right-click the transactedexample project and select Properties.
b. Select Run from the Categories tree.
c. In the Arguments field, type a number that specifies the number of com-
puters to order:
3
d. Click OK.
e. Right-click the project and select Run.
The output looks something like this (along with some additional output):
Click here to view code image
Quantity to be ordered is 3
Retailer: ordered 3 computer(s)
Vendor: Retailer ordered 3 Computer(s)
Vendor: ordered 3 CPU(s) and hard drive(s)
CPU Supplier: Vendor ordered 3 CPU(s)
CPU Supplier: sent 3 CPU(s)
CPU Supplier: committed transaction
Search WWH ::




Custom Search