Java Reference
In-Depth Information
Vendor: committed transaction 1
Hard Drive Supplier: Vendor ordered 3 Hard Drive(s)
Hard Drive Supplier: sent 1 Hard Drive(s)
Vendor: Completed processing for order 1
Hard Drive Supplier: committed transaction
Vendor: unable to send 3 computer(s)
Vendor: committed transaction 2
Retailer: Order not filled
Retailer: placing another order
Retailer: ordered 6 computer(s)
Vendor: JMSException occurred: javax.jms.JMSException:
Simulated database concurrent access exception
javax.jms.JMSException: Simulated database concurrent access
exception
at TransactedExample$Vendor.run(Unknown Source)
Vendor: rolled back transaction 1
Vendor: Retailer ordered 6 Computer(s)
Vendor: ordered 6 CPU(s) and hard drive(s)
CPU Supplier: Vendor ordered 6 CPU(s)
Hard Drive Supplier: Vendor ordered 6 Hard Drive(s)
CPU Supplier: sent 6 CPU(s)
CPU Supplier: committed transaction
Hard Drive Supplier: sent 6 Hard Drive(s)
Hard Drive Supplier: committed transaction
Vendor: committed transaction 1
Vendor: Completed processing for order 2
Vendor: sent 6 computer(s)
Retailer: Order filled
Vendor: committed transaction 2
4. After you run the client, you can delete the destination resources in NetBeans
IDE or by using the following commands:
asadmin delete-jms-resource jms/AQueue
asadmin delete-jms-resource jms/BQueue
asadmin delete-jms-resource jms/CQueue
asadmin delete-jms-resource jms/OTopic
To Run
transactedexample
Using Ant and the
appclient
Command
1. In a terminal window, go to the following directory:
tut-install
/examples/jms/advanced/transactedexample/
2. To build and package the client, type the following command:
ant