Jill Orders Miscellaneous Items From an Online Retailer How Message Unit-of-Work Completes the Order
11.2.3 Message Unit-of-Work Case Study
This section provides a simple case study for Message Unit-of-Work based on an online order that requires a variety of merchandise from multiple companies.11.2.3.1 Jill Orders Miscellaneous Items From an Online Retailer
The Megazon online retailer implements a processing design that uses JMS to process customer orders for a variety of merchandise, some of which need to be routed to Megazons partner companies to complete the order. For example, Megazon can directly fulfill book orders, but must re-route some parts of the order for certain electronics or houseware items. Since Megazon is configured to use UOW, items in an order can be routed as UOW messages to these intermediate company destinations before being passed onto Megazons terminal destination where all the UOW messages that comprise the order are gathered before a final invoice can be processed. The Megazon JMS processing system is composed of: ■ A UOW producer sending order fulfillment component messages with the required UOW properties to the appropriate intermediate andor terminal destinations. ■ Intermediate destinations for non-book items, where UOW component messages are processed by consumer andor producer clients before being passed onto the final UOW destination. ■ A UOW terminal destination where the component messages are gathered for final processing. Jill logs into her Megazon account and does some holiday shopping. She chooses a book, flash drive, MP3 player, and a lava lamp and then proceeds to the checkout, and completes the sales transaction.11.2.3.2 How Message Unit-of-Work Completes the Order
To ensure that all messages in Jills order are processed as a single unit, the order-taking JMS producer client sets UOW properties on her order messages to indicate that they are part of a single unit. These UOW message properties must also be copied by any consumer andor producer clients listening on the intermediate Gadget Planet, Widget World, and Desperate Housewares destinations before they pass the UOW messages onto the terminal destination. Last, the system administrator for Megazon configures the terminal destination to UOW Message Handling Policy parameter to Single Message Delivery. See Section 11.3, How to Create a Unit-of-Work Message Group. The following diagram and corresponding actions demonstrate how Jills order was processed using Message Unit-of-Work. 11-4 Programming JMS for Oracle WebLogic Server Figure 11–1 Workflow for Jills Order Using Unit-of-Work 1. Jill clicks the order button from her shopping cart. 2. The order is split into three messages that use the same unique UOW name: ■ SEQ1, which is routed to the intermediate Gadget Planet queue, where a consumer processes the Flash Drive order before passing SEQ1 onto a producer who then routes it to the intermediate Widget World queue, where a consumer processes the MP3 player order before passing SEQ1 to the terminal Megazon queue for final invoice processing. ■ SEQ2, which is routed to the intermediate Desperate Housewares queue, where a consumer processes the lava lamp order before passing SEQ1 onto a producer who routes it to the Megazon terminal processing queue for final invoice processing. ■ SEQ3, which is routed directly to Megazons terminal queue for book order fulfillment and for final invoice processing. 3. The terminal Megazon queue gathers the three UOW messages before forming them into an ObjectMessage list for delivery to Megazons invoice consumer client. 4. Jill receives an invoice that shows her entire order has been processed.11.3 How to Create a Unit-of-Work Message Group
Parts
» Oracle Fusion Middleware Online Documentation Library
» Document Scope and Audience Guide to this Document
» Related Documentation New and Changed JMS Features In This Release
» Major Components WebLogic JMS Architecture
» Point-to-Point Messaging PublishSubscribe Messaging
» Using the Default Connection Factories
» Connection Understanding the JMS API
» WebLogic JMS Session Guidelines Session Subclasses Non-Transacted Session
» MessageProducer and MessageConsumer Understanding the JMS API
» Message Header Fields Message
» Message Property Fields Message
» ServerSessionPoolFactory ServerSessionPool ServerSession Understanding the JMS API
» ConnectionConsumer Understanding the JMS API
» Message Compression Message Properties and Message Header Fields Message Ordering
» Topics vs. Queues Asynchronous vs. Synchronous Consumers
» Persistent vs. Non-Persistent Messages
» Deferring Acknowledges and Commits Using AUTO_ACK for Non-Durable Subscribers
» Avoid Multi-threading Using the JMSXUserID Property
» Declaring a Wrapped JMS Factory using Deployment Descriptors
» Injecting Resource Dependency into a Class Non-Injected EJB 3.0 Resource Reference Annotations
» Automatically Enlisting Transactions Container-Managed Security
» Connection Testing Java EE Compliance Pooled JMS Connection Objects
» Speeding Up JNDI Lookups by Pooling Session Objects Speeding Up Object Creation Through Caching
» Performance and Tuning Disabling Wrapping and Pooling Simplified Access to Foreign JMS Providers
» ejb-jar.xml weblogic-ejb-jar.xml
» PoolTest.java PoolTestHome.java PoolTestBean.java
» Using compenv Sending a JMS Message In a Java EE Container
» Dependency Injection EJB 3.0 Wrapper Without Injection
» Create a Queue Session Create a Topic Session
» Create QueueSenders and QueueReceivers Create TopicPublishers and TopicSubscribers
» Step 1: Look Up a Connection Factory in JNDI Step 6a: Create the Message Object Message Producers
» Step 6b: Optionally Register an Asynchronous Message Listener
» Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7
» Send a Message Using Queue Sender
» Send a Message Using TopicPublisher
» Create a Message Object Define a Message Setting Message Producer Attributes
» Asynchronous Message Pipeline Receiving Messages Asynchronously
» Use Prefetch Mode to Create a Synchronous Message Pipeline
» Importing Required Packages Acknowledging Received Messages
» Setting a Redelivery Delay Overriding the Redelivery Delay on a Destination
» Defining a Session Exception Listener Closing a Session
» Preconditions for Deleting Destinations What Happens when a Destination is Deleted
» Defining the Persistent Store Setting the Client ID Policy
» Defining the Client ID Creating a Sharable Subscription Policy
» Creating Subscribers for a Durable Subscription Best Practice: Always Close Failed JMS ClientIDs
» Deleting Durable Subscriptions Modifying Durable Subscriptions
» Setting Message Header Fields
» Setting Message Property Fields
» Browsing Header and Property Fields
» Displaying Message Selectors Indexing Topic Subscriber Message Selectors To Optimize Performance
» WebLogic XML APIs Using a String Representation Using a DOM Representation
» Releasing Object Resources Configuring JMS System Resources Using JMSModuleHelper
» Creating a JMS System Resource Deleting a JMS System Resource
» Configuring JMS Servers and Store-and-Forward Agents Best Practices when Using JMSModuleHelper
» Benefits of Using Multicasting Limitations of Using Multicasting Using WebLogic Server Unicast
» Step 2: Set Up the Message Listener Dynamically Configuring Multicasting Configuration Attributes
» Uniform Distributed Destinations Weighted Distributed Destinations
» Queue Forwarding QueueSenders QueueReceivers
» TopicPublishers TopicSubscribers Using Replicated Distributed Topics
» Maximizing Production Stuck Messages
» Message Processing According to the JMS Specification Message Processing with Unit-of-Order
» Message Delivery with Unit-of-Order
» Joe Orders a Book What Happened to Joes Order
» Unit-of-Order and Distributed Topics Unit-of-Order, Topics, and Message Driven Beans
» Basic UOW Terminology Rules For Processing UOW Messages
» Example UOW Producer Code UOW Exceptions
» Limitations of UOW Message Groups Overview of Transactions
» WebLogic Messaging High Availability Features
» Application Design Limitations When using Replicated Distributed Topics Advanced Topic Features
» What is the Subscription Key Configuring a Shared Subscription
» Managing Durable Subscriptions How Sharing a Durable Subscription Works
» Sample Producer Code Re-usable ConnectionFactory Objects
» Re-usable Destination Objects Reconnected Connection Objects
» Reconnected Session Objects Automatic Failover for JMS Producers
» Special Cases for Reconnected Consumers
» Integer int Long long Character char String
» Closing Connections Helper Functions
Show more