1

I have this problem in one of my projects.

I have 2 MDBs that work to perform a task.

  1. The 1st MDB runs, inserts some data into database and sends the required reference number to JMS Queue.

  2. The 2nd MDB listens to this JMS Queue, and upon receiving the message, picks it up and starts processing using the database reference numbers.

The 2 phase commit is used using XA conection.

commit is executed only after database insert/update statement is run and message is sent to the queue.

The problem is, the 2nd MDB picks up the message and runs, and it cannot find the data that the 1st MDB has inserted/updated.

It goes to say that JMS Message is posted first and then the database commit happens.

The project requires that the message is sent only after database transactions are done.

Can anybody help?

I am using 2PC, so ideally, message commit and database commit should happen at the same time.

Anant_00
  • 133
  • 1
  • 5
Ravi
  • 11
  • 1
  • You should append some kind of log or code... – guness Nov 18 '14 at 09:59
  • This question looks like a race condition very similar to: http://stackoverflow.com/questions/2418292/delivery-of-jms-message-before-the-transaction-is-committed Look into Weblogic LLR – Display Name is missing Nov 18 '14 at 18:05
  • @castling... Yes, this is the exact same problem put in simple words. Problem is, the best answer says Weblogic avoids this problem, and my setup is on Weblogic. and I still face the problem. – Ravi Nov 19 '14 at 14:02

0 Answers0