Author |
Message
|
Galichet |
Posted: Thu Apr 06, 2006 6:16 am Post subject: Problem with an insert out of UOW |
|
|
Acolyte
Joined: 26 Jun 2001 Posts: 69 Location: Paris - France
|
Hi all,
My configuration is WBI V5 CSD4 with DB2 V7.2 service pack 13 all running on Unix AIX.
I have a flow with one compute node performing an insert into a table in the Database EAI.
The datas inserted are for example the MsgId and a Status 'OK'.
After this compute node I have an MQOutput node.
If the put doesn't work, I want to do a global Rollback but I want to insert into the same table the MsgId and a status 'KO'.
For this requirement, the catch terminal of my MQInput node is connected to a compute node inserting the 2 values in the table. Of course, I change the transactionnal mode to automatic commit. After that there is a Throw node just to perform the global Rollback.
I expected to have in the record containing the MsgId and 'KO', but an exception is generated :
(0x03000000):Text = 'Transaction will be committed, but a pending automatic transaction exists'
Do you know why ? Do you have an idea about what should I do to have what I expected ?
Thanks _________________ Eric Galichet
SMABTP
France |
|
Back to top |
|
 |
sirsi |
Posted: Thu Apr 06, 2006 7:14 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
in the first compute node ( connect to out terminal of Input node ) you have given transaction as "Automatic" and in another compute node (connected to catch terminal) you have set it to "Commit".. this will create inconsistent DSN connection as both compute nodes refer to same DSN..
In catch node send the message to another queue. Create another flow which reads from this queue and does the insert for you. |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Apr 06, 2006 7:52 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Galichet,
Is this table only getting inserts from you or from another application/flow ?
Regards. |
|
Back to top |
|
 |
dipankar |
Posted: Thu Apr 06, 2006 8:02 pm Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Galichet,
Sirsi is absolutely correct.
Quote: |
Do you have an idea about what should I do to have what I expected ? |
Here Sirsi is also correct.
But I have a suggestion. You can change transaction mode of first compute node (after input node) to Commit from Automatic. In this case you need not to create another message flow and a new input queue. _________________ Regards |
|
Back to top |
|
 |
sirsi |
Posted: Fri Apr 07, 2006 4:46 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
if you give commit then other database transactions( which are suppose to get rolled back) will also get commit.. If not the case then you can give commit. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 07, 2006 4:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I believe you can also create a second DSN to the same database, and get a different transaction on that DSN than the first one. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sirsi |
Posted: Fri Apr 07, 2006 5:00 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
i that case no need to create another flow as i mentioned above. |
|
Back to top |
|
 |
Galichet |
Posted: Wed Apr 12, 2006 1:00 am Post subject: |
|
|
Acolyte
Joined: 26 Jun 2001 Posts: 69 Location: Paris - France
|
ok, Thanks for the answers. It's exactly what I supposed. _________________ Eric Galichet
SMABTP
France |
|
Back to top |
|
 |
|