A.2. Transactions
The TransactedExample.java program demonstrates the use of transactions in a JMS client application. The program represents a highly simplified e-Commerce application, in which the following things happen.
1. | A retailer sends a message to the vendor order queue, ordering a quantity of computers, and waits for the vendor's reply. |
2. | The vendor receives the retailer's order message and places an order message into each of its suppliers' order queues, all in one transaction. This JMS transaction combines one synchronous receive with multiple sends. |
3. | One supplier receives the order from its order queue, checks its inventory, and sends the items ordered to the destination named in the order message's JMSReplyTo field. If it does ... |
Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.