JAVA消息服务（JMS）:示范工程----需求、API分析、解说

一、业务需求--Transactions Demo：The
example simulates a simplified eCommerce application with four
parts:
the retailer who places the orders, the vendor who assemples the
computers,
and two suppliers--one for hard drives and another for
monitors.

The retailer sends a message to the vendor's queue and awaits a
reply.
The vendor receives the message and sends a message to each of
the
supplier's queues. It does this in a single transaction, and will
randomly
throw an exception simulating a database error, triggering a
rollback.
Each supplier receives the order, checks inventory and replies to
the
message stating how many items were sent.
The vendor collects both responses and responds to the retailer,
notifying
wheather it cna fulfill the complete order or not.
The retailer receives the message from the vendor.