ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with an insert out of UOW

Post new topic  Reply to topic
 Problem with an insert out of UOW « View previous topic :: View next topic » 
Author Message
Galichet
PostPosted: Thu Apr 06, 2006 6:16 am    Post subject: Problem with an insert out of UOW Reply with quote

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
View user's profile Send private message Send e-mail
sirsi
PostPosted: Thu Apr 06, 2006 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Thu Apr 06, 2006 7:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
dipankar
PostPosted: Thu Apr 06, 2006 8:02 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi Galichet,
Quote:
Do you know why ?

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
View user's profile Send private message
sirsi
PostPosted: Fri Apr 07, 2006 4:46 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Apr 07, 2006 4:55 am    Post subject: Reply with quote

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
View user's profile Send private message
sirsi
PostPosted: Fri Apr 07, 2006 5:00 am    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

i that case no need to create another flow as i mentioned above.
Back to top
View user's profile Send private message
Galichet
PostPosted: Wed Apr 12, 2006 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with an insert out of UOW
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.