JMS: Unit of Order Scope (Producer or Message) [WLS]

Is it the intent of "Unit of Order" to be used at the Producer layer or at the message layer? The documentation seems to imply the former.
The documentation describes the method WLProducer.setUnitOfOrder(uooName). This implies that the intent is to set the Unit of Order name, and then send many messages within the Unit of Order.
I have a stream of messages that are mostly unrelated. Each message affects one entity, and the system has many (10s-of-thousands) entities. Unrelated messages can be processed in any sequence. However, every once in a while there are two messages for the same entity that are in close time proximity. These messages must be processed in sequence.
Since the Unit of Order is different for every message, the natural approach would be to set it in the send method. But WLS does not offer that.
The alternative is to call WLProducer.setUnitOfOrder( entityId) before each send. Would that be reasonable, or is that against the intent of Unit of Order?
Thanks...
Roger
PS: My appologies, I posted this in the wrong group. It relates to WEbLogic Server.
Message was edited by: rfischer
rfischer

I am assuming a single queue, non-Distributed Queue for this post, and that your CPU and memory for your WebLogic server have some headroom per queued message.
I agree that you should try UOO, if the server has enough memory headroom to accommodate Unit of Order data structures for the messages that are in the Queue.
There are some small coordination objects and the user defined string per UOO.
These objects are for the UOO messages that are currently in the queue rather than all the ones the server has ever encountered.
Though you may have tens of thousands of UOOs possible in your application, it sounds like a message for each one is probably not in the queue at the same time.
If you have a few hundred messages in the queue, and your server already has ample memory and CPU,
then adding the memory overhead of UOO is worth the investment for the correctness you get in return, see below.
If you really have tens of thousands of messages in the queue, and your server already has ample memory and CPU to accommodate the UOO objects,
then adding the memory overhead of UOO may still be worth the investment for the correctness you get in return.
The hard part here is the extra memory usage since UOO is not paged out the way message bodies are.
So you will have more memory use and Garbage Collection.
There is also more CPU since you have to look up the UOO when you produce the message.
This makes trying it more important before you go into production.
In both cases, you should certainly see less database lock and internal lock contention if your lock objects are related to your UOO names, since there will be only one thread in execution with that UOO name.
So you may see a database throughput improvement, which may be the heaviest part of your application.
Choosing the UOO name is always important, long enough to reduce contention, short enough to have as message payload and in memory.
I hope you post the results of your evaluation,
-Sal

Similar Messages

  • JMS: Unit of Order Scope (Producer or Message)

    Is it the intent of "Unit of Order" to be used at the Producer layer or at the message layer? The documentation seems to imply the former.
    The documentation describes the method WLProducer.setUnitOfOrder(uooName). This implies that the intent is to set the Unit of Order name, and then send many messages within the Unit of Order.
    I have a stream of messages that are mostly unrelated. Each message affects one entity, and the system has many (10s-of-thousands) entities. Unrelated messages can be processed in any sequence. However, every once in a while there are two messages for the same entity that are in close time proximity. These messages must be processed in sequence.
    Since the Unit of Order is different for every message, the natural approach would be to set it in the send method. But WLS does not offer that.
    The alternative is to call WLProducer.setUnitOfOrder( entityId) before each send. Would that be reasonable, or is that against the intent of Unit of Order?
    Thanks...
    Roger

    I am assuming a single queue, non-Distributed Queue for this post, and that your CPU and memory for your WebLogic server have some headroom per queued message.
    I agree that you should try UOO, if the server has enough memory headroom to accommodate Unit of Order data structures for the messages that are in the Queue.
    There are some small coordination objects and the user defined string per UOO.
    These objects are for the UOO messages that are currently in the queue rather than all the ones the server has ever encountered.
    Though you may have tens of thousands of UOOs possible in your application, it sounds like a message for each one is probably not in the queue at the same time.
    If you have a few hundred messages in the queue, and your server already has ample memory and CPU,
    then adding the memory overhead of UOO is worth the investment for the correctness you get in return, see below.
    If you really have tens of thousands of messages in the queue, and your server already has ample memory and CPU to accommodate the UOO objects,
    then adding the memory overhead of UOO may still be worth the investment for the correctness you get in return.
    The hard part here is the extra memory usage since UOO is not paged out the way message bodies are.
    So you will have more memory use and Garbage Collection.
    There is also more CPU since you have to look up the UOO when you produce the message.
    This makes trying it more important before you go into production.
    In both cases, you should certainly see less database lock and internal lock contention if your lock objects are related to your UOO names, since there will be only one thread in execution with that UOO name.
    So you may see a database throughput improvement, which may be the heaviest part of your application.
    Choosing the UOO name is always important, long enough to reduce contention, short enough to have as message payload and in memory.
    I hope you post the results of your evaluation,
    -Sal

  • Consume JMS Unit-Of-Work message through OSB proxy service

    Hi,
    Anyone know how to consume a JMS Unit-Of-Work (UOW) message using an OSB Proxy Service of JMS type?
    I can submit a unit-of-work JMS message (which consists of multiple constituent messages) using an OSB proxy & business service combination and setting the UOW transport headers appropriately. I can also separately produce and consume Java objects via a JMS queue where the consumption is done via OSB proxy (of java request message type), but these aren't UOW messages.
    Apparently as soon as it is a UOW message then the message consumed is an ObjectMessage ArrayList and one has to use the "Java" request message type for the JMS consumer proxy, but I'm unsure of how to create the concurrent client jar to use it in the same proxy service's JMS transport configuration in order to output the ObjectMessage ArrayList (UOW message). 
    Ideally I'd like to consume a single UOW XML message via an OSB JMS proxy service.
    Any pointers would be appreciated.
    R

    Finally got this working!!
    For posterity: Needed to insert Java Object JMS messages on the OSB JMS producer (Business Service) side with correct UOW jms transport header set in route node. Then consume the Unit-Of-Work message on the other side via jms proxy service with "java" request message type, with appropriate jar containing the Object class as the "Client jar" in the JMS Transport configuration. In the same JMS consumer proxy I had to do a java callout, passing the contents of $body, using java.util.ArrayList and javax.jms.ObjectMessage, as input into a method (.. decodeJavaMessage(ArrayList<ObjectMessage> ...)). In this java callout class you can get to each individual ObjectMessage via typecasting the get() method on the Arraylist to (ObjectMessage) and then just typecast the getObject() on this Objectmessage into your original Java Class (same as what you inserted onto queue originally).
    Hope this saves someone some time in future!

  • Weblogic Unit Of Order on Javax.JMS

    Hi I want to use Weblogic Unit of Order on Javax.jms and not on Weblogic.jms, does anyone know how to do that.

    You need to use WLS JMS extension interface to programmatically set a Unit-of-order. In order for applications that use pure javax.jms interfaces to take the advantage of Unit-of-order feature, WLS allows administrators to enable unit-of-order via configuration. Once you enable Unit-of-order on a connection factory, all messages sent from one session will belong to the same unit-of-order either with a system-generated name or a user-generated name. In addition, you could enable unit-of-order on a per destination basis as well.
    For details, please refer to http://docs.oracle.com/cd/E17904_01/web.1111/e13727/uoo.htm#i1040257.

  • JMS Uniform Distribute Queue Unit Of Order, problem when one node goes down

    Hi ,
    I have the following code which post a message (with Unit of Order set ) to a Uniform Distribute Queue in a cluster with two member servers (server1 and server2).
    --UDQ is targeted to a subdeployment that is mapped to two JMS servers pointing to each member servers
    --Connection Factory is using default targeting ( i tried mapping to Sub deployment also)
    javax.naming.InitialContext serverContext = new javax.naming.InitialContext();
    javax.jms.QueueConnectionFactory qConnFactory = (javax.jms.QueueConnectionFactory)serverContext.lookup(jmsQConnFactoryName);
    javax.jms.QueueConnection qConn = (javax.jms.QueueConnection)qConnFactory.createConnection();
    javax.jms.QueueSession qSession = qConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    javax.jms.Queue q = ( javax.jms.Queue)serverContext.lookup(jmsQName);
    weblogic.jms.extensions.WLMessageProducer qSender = (weblogic.jms.extensions.WLMessageProducer) qSession.createProducer(q);
    qSender.setUnitOfOrder("MyUnitOfOrder");
    javax.jms.ObjectMessage message = qSession.createObjectMessage();
    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("something", "SomeObject");
    message.setObject(map);
    qSender.send(message);
    } catch (Exception e) {           
    Steps followed:
    1. Post a message from "server1"
    2. Message picked up by "server2"
    3. Everything fine
    4. Shutdown "server2"
    5. Post a message from "server1"
    6. ERROR: "hashed member of MyAppJMSModule!MyDistributedQ is MyAppJMSModule!MyJMSServer-2@MyDistributedQ which is not available"
    WebLogic version : 10.3.5
    Is there a way (other than configuring Path Service ) to make this code work "with unit of order" for a UDQ even if some member servers go down ?
    Thanks very much for your time.

    If you want to avoid use of the Path Service, then the alternative is to make the destination members highly available. This will help ensure that the host member for a particular UOO is up.
    One approach to HA is to configure "service migration". For more information see the Automatic Service Migration white-paper at
    http://www.oracle.com/technology/products/weblogic/pdf/weblogic-automatic-service-migration-whitepaper.pdf
    In addition, I recommend referencing Best Practices for JMS Beginners and Advanced Users
    http://docs.oracle.com/cd/E17904_01/web.1111/e13738/best_practice.htm#JMSAD455 to help with WL configuration in general.
    Hope this helps,
    Tom

  • Unable to confirm transfer order due to error message "enter a storage unit

    Hi guys:
    I am unable to confirm transfer order due to error message popping up and saying "enter a storage unit", and I tried to search it in whole thread in the forum,it was suggestion to pick up destination storage unit via ls24, but I did went to ls24 and trying to click that line(transfer order) but unable to find the storage unit, so is there another way to fix it?

    Hi Allen...
    Pls check if your Storage Type is SU Active. If yes, then system will create a storage unit according to the setting done for the storage unit management, perhaps in your case you are confirmin TO for the putaway.
    Pls confirm and revert
    Regards
    Shiva

  • Using weblogic unit-of-order (UOO) in osb proxy service

    Hi,
    I have a JMS Queue deployed to Weblogic server. The messages inside the queue are grouped using the JMS_BEA_Unit-of-order (UOO) Weblogic feature.
    Now i have a OSB 10g Proxy Service which reads messages from this Queue. The problem is, on recieving a message, acknowledgement is send immediately, thus removing the message from the Queue and next message with same Unit-Of-Order is ready for processing.
    But the business scenario needs the first message to be read, processed and then decide to acknowledge or not. The second message should not be read unless the previous message is processed successfully.
    Can anyone help with this scenario?
    Thanks,
    Alex
    Edited by: user9024636 on Feb 11, 2010 2:57 AM

    Hi Steve,
    I don't know what you need UOO for, but, for some use cases, its sufficient just to configure a default UOO on the sender's connection factory.
    Propapagation of a UOO from one desitnation to another is not automatic (except via SAF, or unless OSB somehow does it for you). Plain vanilla JMS apps do this by calling msg.getStringProperty("JMS_BEA_UnitOfOrder") on the received message and setUnitOfOrder() on the javax.jms.WLProducer.
    You might find that there's more OSB expertise on an OSB newsgroup (I think it's one of the newsgroups under [url http://forums.oracle.com/forums/category.jspa?categoryID=194]SOA & Process Management).
    Regards,
    Tom

  • Unit-of-order questions

    Hi,
    suppose that there are 2 messages in jms queue with unit-of-order configurated (createCustomer and modifyCustomer), what happened if the process that works the first message crashes? The second message remain in the queue or is removed from queue?
    Thk
    Leo

    In this example i would assume you would have set UOO to customer ID. Weblogic JMS ensures all messages with the same UOO are delivered to the client in the same order in which it is published. It would be upto the jms client to handle for situations like system crash ( e.g. by using transacted MDB ). From weblogic JMS perspective it will deliver the 2nd message with the same UOO to the client only if it is assured that the first message was delivered successfully to the client.
    E.g. when using transactional delivery, the transaction has to commit, when using client acknowledgement mode, the ack has to be received from the client and so on.

  • JMS Unit-Of-Work in OSB Proxy Service

    I'm trying to create a JMS Unit-of-Work OSB Service by populating the JMS transport user properties:
    JMS_BEA_UnitOfWork
    JMS_BEA_UnitOfWorkSequenceNumber
    JMS_BEA_IsUnitOfWorkEnd
    However, after publishing all of the messages to the Queue, JMS is not recognizing the end of the UOW.
    When I publish the last message in the UOW, I set 'JMS_BEA_IsUnitOfWorkEnd' in the transport header properties to true(). However, when I look at the last message in the queue, it shows correctly that the JMS Properties Key is 'JMS_BEA_IsUnitOfWorkEnd', the Value is 'true', but the type is 'java.lang.String.' I believe the problem could be that the type is incorrect - it should be a java.lang.Boolean. However, I cannot figure out how to make it a boolean. Can you help? Do I need a boolean here? How do I assign a boolen to the transport header? I've tried 'true', 'true()', and xs:boolean('true') and they all wind up be java.lang.String!
    Thanks.

    string value for JMS_BEA_IsUnitOfWorkEnd should work just fine.
    Make sure all messages in the same group has the same JMS_BEA_UnitOfWork value.
    you can use OSB to produce unit of work messages.
    for the consumer, you need to create a jms proxy using java type, then use a java callout to convert the message array list into xml that you can then process in a for loop.
    Edited by: jerry.sy on May 13, 2011 1:38 PM
    Edited by: jerry.sy on May 13, 2011 1:40 PM

  • Adobe MM Purchase Order - Output as FAX Message Type - Output Missing

    Hi All,
    Hope some one has some pointers on what to do here, I am at a bit of a loss.
    Situation.
    I have developed a Adobe Purchase order based on the std form MEDRUCK_PO supplied with the ECC6 R/3 system.  We have kept the same interface inputs, so no changes would be required to the SAP std output program.
    Any additional customising data was implemented as globals in the interface and coded accordingly.
    The purchase order is produced and output when using the output type of printer.  However when we change the output type to FAX no output is produced.  By this I mean no changes are shown in the wait queue in SCOT and no messages are shown in SOST.  However the record in NAST shows that the output was produced OK.
    Questions:
    1) Does the SAP std program need to be modified if the output type is FAX?
    2) What configuration changes are required if any to get this working?
    Thanks in Advance
    David Cooper

    It is not possible to FAX Adobe Output using the SAP std Supplied code in ECC6 SP12.

  • Scalability of Unit of Order

    1. We are considering using Unit Of Order (UOO) in an Active-Active weblogic cluster.
    What are the vertical and horizontal scalability options of UOO in such a case?
    2. To ensure strict sequencing requirements of messages, could we consider using a w s reliable messaging session as an alternative to UOO?
    Thanks,
    B.

    Hi,
    I read the document, Michal, chapter 3.1.3 about load balancing is quite helpfull. Thank's.
    As I understand it right for scaling up the adapter engine (java stack) I would need a web dispatcher but for scaling up the integration engine (ABAP stack) this would do the message server. Right?
    As I understand it, Jaime, most of the performance/memory is needed for the mapping in general? That's why normal mappings don't use XSLT?
    Kind regards,
    Horst
    PS: The quicksizer did not work for me (with firefox)

  • Ordering using Unit-Of-Order

    Hello All,
    I was going through the oracle docs to understand how Unit Of Order works and came across this case study below:
    The sequence is
    Joe clicks the order button from his shopping cart.
    The order message (message A) is placed on Queue1
    Joe cancels the order
    My question is since the order message is still on Queue1 and is not in the database yet; there is no order to cancel. So, in step 3 Joe cancels which order?
    I hope to get some clarification about the unit of order from the experts in the group.
    Thanks
    Purnima
    Workflow for Joe’s Order Using Unit-of-Order
    Joe clicks the order button from his shopping cart.
    The order message (message A) is placed on Queue1.
    Joe cancels the order.
    The cancel order (message B) is placed on Queue1.
    MdbX takes message A from Queue1.
    MdbY takes message B from Queue1.
    Message B on MdbY is blocked until MdbX acknowledges the order message. See What Happens When a Message Is Delayed During Processing?.
    Message A is committed and written to the database.
    Message B is committed and written to the database.
    Because there is a corresponding order message, Joe’s order is removed from the database and he does not receive a book.

    use xa connection factory

  • Open order value not cleared Message: ORB 015

    Hi All,
    I have checked and searched for solution before poting this discussion, but not found anything relelvant to my problem.
    While closing Project in CJ20N, I am getting an error message as -
    Open order value not cleared
    Message: ORB 015
    It seems issue with incoming orders (sales orders), so I have run CJA1, and in output it is showing Processed object count as 1 but no detail log available for this.
    Also in Settlement nothing is appearing to settle.
    One thing I observed that one of the sales order linked with Project is rejected.
    Can somebody assist me in resolving this issue?
    Thank You,
    Swapnil Kharul

    Hi Swapnil,
    There are 2 things you can check here..
    1) Is this the first time you are trying to settle incoming orders for the said Project/WBS? I mean did you ever run CJA1/CJA2 and CJ88 post that for this project? You can check this in KE24 report. Check if you find any entries for record type I. If there are any it means settlement of incoming orders is being done.
    2) For the said WBS hit Ctrl+F3 and check if there is a settlement rule maintained for Incoming Orders. On the settlement rule screen you will see a button "Incoming Orders". Click on that see if a rule is maintained.
    Regards,
    Gokul

  • I am trying to set up my new replacement phone and the iCloud account is using my old email that is no longer activated, so I am not able to reset my password in order to set up messaging, etc. What do I do??

    I am trying to set up my new replacement phone and the iCloud account is using my old email that is no longer activated, so I am not able to reset my password in order to set up messaging, etc. What do I do??

    Try to change your Apple ID back to your old email address (http://appleid.apple.com) in order to set up and activate the phone. After the set up please sign out of iCloud and turn off "Find My iPhone" (Settings > iCloud) - do that on all your devices -, then change your Apple ID to your new address again and then add your iCloud account on you devices again.

  • JMS sender adapter is not picking up message from MQ

    Hi Experts,
    I have configured the JMS sender adapter for getting message from Websphere MQ. In RWB the adapter and the communicaiton channel all looking good. The trace file tells me the connection to the queue has been established.
    But the problem is this JMS sender adapter is not picking up message from the Queue defined on the MQ site.
    Any Idea what could be wrong?
    Thanks!
    Jason
    Jason

    Hi,
    1) Can you activate the JMS adapter again ( edit save and activate it )
    2) Check whether the right Queue is addressed.
    Regards
    Agasthuri Doss

Maybe you are looking for

  • AuC Down Payment not clearing

    Hi Gurus, The scenario is that we are using WBS elements to collect costs for AuC. So project Consumption POs were raised and down payments were made against them. Now at the year end some of these need to be settled to AuC. This we did and down paym

  • TDM  Not Working

    I have a mid-2010 iMac with mini-display port.  This is the target computer I want to turn into a glorious monitor. I also have a late 2013 MacBook.  This is the superfast computer whose ram and hard-drive I want to exploit. I have a thunderbolt cabl

  • Simple HTML-JSP Question

    Hi Friends, I've a check box and combo in my jsp.I need that only when the checkbox is checked ,combo values should be read otherwise not.But whenever the page reloads,the checkbox is selected by default.Can somebody tell me how to stop this behaviou

  • How to insure selected tabs are visible in JTabbedPane

    Hello all, How can you insure that the selected tab in a JTabbedPane is visible. Here is the code: import javax.swing.*; import java.awt.*; public class TabbedPaneTest extends JTabbedPane implements Runnable public TabbedPaneTest() super(JTabbedPane.

  • Query on SQL UPDATE

    Hi, A small query regarding the SQL Update...... I have the below table values where I want to update two columns..... EmpID EmpName Sal DocID DocSeqNum CreaDate ======================================== 1 XYZ 25 289 1 12-MAY-2012 2 XYZ1 50 289 2 12-M