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 » Transaction control using nonXA compliant DB

Post new topic  Reply to topic
 Transaction control using nonXA compliant DB « View previous topic :: View next topic » 
Author Message
amigupta1978
PostPosted: Tue Feb 05, 2002 4:30 pm    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

Hi,
I have a query about using a NOX XA complant database in the MQSI.
I am using the MQSI v 2.0.2 on AIX 4.3.3 with Oracle as the DB(Oracle on AIX doesnot suppot the XA transactions)

I have the message flow

(out terminal)-> DatbaseNode(db1) ->MqoutputNode(MQOUT1)
/
MQInputNode(MQINP1)
(catch terminal)->errorhandlingflow(err1)

The input node TransactionMode is set to YES. Under normal circumstances I pass one XML message in the MQINPut Node which I parse and update the database(oracle) and then output the message to the MQOUT1 node.
Now the problem is that say the message Queue (as defined in MQOUT1) is put inhibibited or full and then I pass the message the message get roll back to my Error Handling flow but the updates in the database in node db1 are not rolled back. Is this the expected behaviour?? (Since previously I had worked with the XA complant database DB2 and in that case what I remember that the database transaction also rolled back)
If this is the expected behaviour then how can we modify the flow to make it roll back the oracle transaction too. (one way I found out to disconnect the error handling flow but this is bad since we need to process the error )

Can any body provide me some help on this?

Thanks in advance

Regards,
Amit

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kirani
PostPosted: Tue Feb 05, 2002 10:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

How about deleting records from the DB in Failure terminal?
Back to top
View user's profile Send private message Visit poster's website
amigupta1978
PostPosted: Wed Feb 06, 2002 9:29 am    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

hi,
thnx for the help.
But I think I am bit opposed to this idea. There are 3 problems First we have parse the exception list and find out the exact cause of the problem say whether the flow backed out due to the database node failure or the queue failure. Secondly deleteing might be ok but if I have updated something in the DB node then I am no where since the msg only contains the the information abt the new data to be updated, nothing abt the old data, so I cant roll back to the original position, Thirdly say again the DB node fail in the Failure flow then again I am in no man's land.
But I want to ask onething is the thing that is happeneing in my flow is the standard thing or I am missing something or some attribute in my flow.

Thanks and Regards,
Amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mpuetz
PostPosted: Thu Feb 07, 2002 10:19 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

you do have transactional control over your database
updates as well. Simply set the transaction flag
in your database (or compute node) on your datasource
to yes. By default it' set to automatic which means:
transactional if the input message was persistent.

The only difference to XA control of MQSeries is that
the broker issues two separate commit calls one for
MQ resources and one for Oracle. Thus it's just single
phase commit.


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
amigupta1978
PostPosted: Thu Feb 07, 2002 11:55 am    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

Hi,
Thnx for the reply.
I am doing this only . I mean my database node is set to transaction to "YES". but the question which I am trying to ask is when did actually broker issue the commit for the database and commit for Queue. The problem is that I dont want to give a commit to the database when I am in the catch terminal of the Input Node. (What I have read in the IBM books that it says if I am using the Try-Catch node and if something fails in the Try block and the flow reaches the Catch block which is successful then it will commit the database changes that were there in the Try path.) But What I would like to happen that I dont want the database commit in the TRY path if something fails and the flow goes to the catch terminal and I am not sure is that possible or not in MQSI?? if Yes then how can I achieve this.

Thanks in advance

Regards,
Amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Miriam Kaestner
PostPosted: Fri Feb 08, 2002 1:56 am    Post subject: Reply with quote

Centurion

Joined: 26 Jun 2001
Posts: 103
Location: IBM IT Education Services, Germany

Hi,
add a Throw node at the end of you CATCH path. This will have the effect of rolling back all updates to MQ and DB resources that were made under TX-Control.
The original message will be again be available on the input queue.
If you want to prevent this, wire the failure terminal of MQInput node.
Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Fri Feb 08, 2002 2:32 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

just one more thought to illucidate what's happening.
MQSI doesn't support nested levels of transactional contexts
as you assumed, but only one, which starts and ends at the input
node. I.e. the input starts a transaction and commits/rollbacks
it. Thus the only way you cause a rollback to coordinated resources
is by ending your flow with an exception in your catch tree
of your *input* node (not any other try/catch node).
(of course, if you don't connect the catch terminal of the input
node and throw an exception that will do the same).



_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
amigupta1978
PostPosted: Fri Feb 08, 2002 10:24 am    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

Hi,
Thnx for all the replies these make things more clear to me...But still i have one query my message looks like
<Message><DATA>all the information about the database to be updated</DATA><Exception>if there is any exception in MQSI </Exception></Message>
So the way we have designed the application is that we are sending the message that contains two parts firs the Data part which have all the info about the database fileds to be update and the routing info where the messae will finally land up to using destinationLists. Second part of the message is the Exception part. Here in thsi part we want to append any exception that ws encountered during the running of the message flow in MQSI say either the database exceptions or the MQ exceptions like unable to put data in the destined queue. So If I use the approach to adding the Throw node in the Catch flow, one problem is solved that my database transactions are rolled back but my other problem remains that the Exception part of the message will also be lost lost since after throwing the exception again the message will again have the original form so we will not be able to append the exception information in the message. Actually If any exception happens we want to show that to the administrator., Is there any way out how to achieve this in my flow??

Thanx in advance
Regards
Amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mpuetz
PostPosted: Sat Feb 09, 2002 6:06 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

to do that you have append the exceptions list
to your original message in the catch tree
of your input node. Put the message to a queue
with transaction mode set explicitly to *no*.
Then you do the final throw to rollback your
database, but your message won't be rollback
since it will be put outside the commit scope.



_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
amigupta1978
PostPosted: Mon Feb 11, 2002 9:54 am    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

Hi,
Thnx. Now the thing is working. I am able to roll back the database and getting the exceptionlist.

Regards,
Amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Transaction control using nonXA compliant DB
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.