Arch2Arch Tab BEA.com
Syndicate this blog (XML)

On JMS Unit Of Work

Bookmark Blog Post

del.icio.us del.icio.us
Digg Digg
DZone DZone
Furl Furl
Reddit Reddit

Prakash Malani's Blog | February 22, 2008   4:46 PM | Comments (2)


Last time I looked at how using Unit Of Order (UOO) helps deliver messages in the same order in which they are produced.

Now, consider we have message driven beans (MDBs) or Spring message driven POJOs (MDPs) listening to the messages. A pool of listener beans is going to process the messages. A listener from the pool picks up the message and processes the message.

In the previous example, we want to deliver the delete message first and then the create message. Now, these messages are going to be processed in parallel. There is a good chance that the create message is delivered after, but processed before the delete message. But, my intention was to not only get the messages delivered, but also processed in the same order.

Unit Of Work can help impose a processing order on the messages. With Unit Of Work messages are grouped into a single group -- known as Unit Of Work. This group of messages is delivered as a single object message. The single object message contains the individuals message. Thus, in my example, the single object message contains the delete message and the create message. Both of these messages are grouped together, delivered together, and now will be processed together.

-----
My blog
Answers to J2EE, Java, UML, Process, and Patterns!
Java Enterprise in a Nutshell


Comments

Comments are listed in date ascending order (oldest first) | Post Comment

  • A literal reading of this blog entry is incorrect: >>> Last time I looked at how using Unit Of Order (UOO) helps deliver messages in the same order in which they are produced ...[but]... consider we have message driven beans (MDBs) or Spring message driven POJOs (MDPs) ... Now, these messages are going to be processed in parallel. If true, this behavior would be a major bug in Unit-of-Order. Messages in the same Unit-of-Order are absolutely prevented from being processed in parallel, no matter how many consumers there are in a pool, and regardless of whether the consumers happen to be in an MDB pool. By design, the next message in a UOO is never delivered to a different consumer until the previous message is processed. Tom Barnes WebLogic JMS Developer Team

    Posted by: barnes on February 27, 2008 at 11:04 AM

  • [Same post with formatting!]

    A literal reading of this blog entry is incorrect:

    >>> Last time I looked at how using Unit Of Order (UOO) helps deliver messages in the same order in which they are produced ...[but]... consider we have message driven beans (MDBs) or Spring message driven POJOs (MDPs) ... Now, these messages are going to be processed in parallel. If true, this behavior would be a major bug in Unit-of-Order.

    Messages in the same Unit-of-Order are absolutely prevented from being processed in parallel, no matter how many consumers there are in a pool, and regardless of whether the consumers happen to be in an MDB pool. By design, the next message in a UOO is never delivered to a different consumer until the previous message is processed.

    Tom Barnes

    WebLogic JMS Developer Team

    Posted by: barnes on February 27, 2008 at 11:06 AM



Only logged in users may post comments. Login Here.

Powered by
Movable Type 3.31