|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Message Flow Commit on Db2 and Oracle database Transactions |
« View previous topic :: View next topic » |
Author |
Message
|
Svp |
Posted: Fri Oct 19, 2012 1:24 pm Post subject: Message Flow Commit on Db2 and Oracle database Transactions |
|
|
Apprentice
Joined: 18 Feb 2010 Posts: 40
|
Hello All,
I have a Message flow reads a message from the MQ Queue and inserts records into two Databases Oracle and Db2 simultaneously (Two Compute Nodes used in this case). I observed during the FK Violation on One of the compute node throws exception and the transactions are rolled back. But the ExceptionList generated doesnt contains Database Exception instead the Exception says "Dequeued failed message. Propagating a message to the failure terminal". The compute node transaction properties are set to Automatic.
Let me know your suggestions to capture the database exception.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Oct 19, 2012 1:54 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Don't use the failure terminal.
Use the catch terminal. |
|
Back to top |
|
 |
Svp |
Posted: Sat Oct 20, 2012 5:29 pm Post subject: |
|
|
Apprentice
Joined: 18 Feb 2010 Posts: 40
|
Actually the exception is not caught in the Catch terminal(though a exception handler is connected in the catch terminal). This is the strange behaviour observed as I explained earlier the exception is thrown in the Failure Terminal.
When a explicit commit is issued in the ESQL after the transaction I am getting the exception in the Catch terminal. As per the requirement the transaction should get handled at the MB transactional level.
I am suspecting this transaction(Handling two database) is handled by MQ inspite of Message Broker. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Oct 21, 2012 3:55 am Post subject: Re: Message Flow Commit on Db2 and Oracle database Transacti |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Are the Compute nodes configured to throw exceptions on database errors?
Svp wrote: |
Actually the exception is not caught in the Catch terminal (though a exception handler is connected in the catch terminal). This is the strange behaviour observed as I explained earlier the exception is thrown in the Failure Terminal. |
Turn on debug trace, to see what's actually happening. The MQInput node behavior is a bit more complicated than that. Check here and here for a more detailed explanation.
It's more likely that the catch exception handler is throwing a second exception, discarding the first exception, forcing a rollback, and backout of message to input queue, and terminating the message transaction. Then the MQInput node starts a new transaction, retries the backed out message, throws a third exception (due to bothreshold exceeded?), and routes the failed message to the failure terminal. At that point, the original exception is long gone. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|