Discussions

General J2EE: 2PC problem with Oracle and JMS

  1. 2PC problem with Oracle and JMS (5 messages)

    Hi, I'm encountering a problem that occurs in a message based system which is running on WebLogic 8.1.4. The situration is that, process B inserts a record to an Oracle database and sends a notify message to a JMS Queue. While process C listens to the JMS Queue and try to read the inserted record from the database when the message arrived. The system has been running for about 2 years, occationally (only happened for few times until last month), process C will not be able to read the inserted record when the JMS message arrived. The problem is now bugging me a lot, as it happened more frequently these days. The problem maybe triggered by a large amount of transactions as our business is getting busy these days. My problem is, why doesn't the XA driver garentee 2PC? Is there any problem to the system settings? The system is configured to use XA JMS Connection Factory, and a NON-XA Oracle driver with "emulate XA" turned on. Also, all of the processes are using JTA. Do you have any idea? Please kindly advice.
  2. "The system is configured to use XA JMS Connection Factory, and a NON-XA Oracle driver with "emulate XA" turned on." You answered your own question.
  3. Hi Christopher, Do you mean the problem is caused by the "emulate XA" feature of WebLogic? Would you please tell me more?
  4. Oh... I didn't mention, the inserted record couldn't be read when the JMS message is received by process C, however, the record did inserted to the database. It's just a bit slower than the JMS message arrive.
  5. I am having the same problem, that is despite the 2PC, the jms message gets posted and processed before the db changes are committed. I am using the oracle XA driver. I have tested it on weblogic 9.2 and 10 and I am about to post a question to weblogic with a sample ear for displaying it. Did u finally solve the problem in your environment???
  6. To answer my own question, it seems to be a problem with 2PC/XA which is not weblogic specific. The commit phase of 2PC is asynchronous for the resources involved, so each resource might commit with a different timing. The situation is described in more detail in: http://www.theserverside.com/news/thread.tss?thread_id=28445#136712