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 IndexWebSphere Message Broker SupportRollbacking DB transactions when the input node is HTTP i/p

Post new topicReply to topic
Rollbacking DB transactions when the input node is HTTP i/p View previous topic :: View next topic
Author Message
Haritha_Flora
PostPosted: Mon Jan 11, 2021 8:14 am Post subject: Rollbacking DB transactions when the input node is HTTP i/p Reply with quote

Novice

Joined: 26 Mar 2019
Posts: 10
Location: Hyderabad,India

Hi All,

Hope you are doing well!

We have a requirement that we have to insert data in the three tables at a time (All or none) and commit should happen if three inserts are successful.

Message Flow

Http Input--(out)-->Compute1-->Route to label label--->Subflow--> Http Reply

Http Input--(Failure and Catch)-->Exception handler

subflow

input-->Comput2-->output

Compute 2 transaction mode property set to "Automatic" (default)
DB insert query logics are written at Compute 2

As far as I know commit and rollback should be handled by the integration node as these are broker coordinated transactions . Commit should happen if the transaction is completed successfully. (Please correct me if am incorrect)

But I have observed that DB transactions are committed even though exception raised in the IIB application (Transaction is not completed)

The DB transactions are roll-backing in case of exception if the failure and catch terminals of HTTP input are not connected.

Here my requirement is DB tran Rollback should happen incase of exception even if Failure and catch Terminals of HTTP input are connected.

Please provide your suggestions to achieve this.

Thanks in advance

Thanks
Haritha_Flora[/i]
_________________
Thanks!
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jan 11, 2021 4:01 pm Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1174

Sounds as if you need coordinated transactions, as described here: https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac07010_.html

That means that you either need to use MQ as your transaction manager, or else you need to configure an XA transaction manager, as described here: https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac00645_.html

Also (before anybody else mentions it) HTTP is not a transactional protocol, so you should consider writing the HTTP request onto a queue as early as possible.
Back to top
View user's profile Send private message
Haritha_Flora
PostPosted: Wed Jan 13, 2021 2:26 am Post subject: Reply with quote

Novice

Joined: 26 Mar 2019
Posts: 10
Location: Hyderabad,India

Thanks you for the information

Hope this help that's why posting here

Achieved this requirement with EXIT HANDLER statements


BEGIN -- block for exit handler starts

DECLARE EXIT HANDLER FOR SQLSTATE LIKE'%'
BEGIN
PASSTHRU('ROLLBACK');
RESIGNAL;


END;

--Business logic (writing all insert queries here)

END;
_________________
Thanks!
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportRollbacking DB transactions when the input node is HTTP i/p
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.