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 SupportSOAP Reply and deferrable constraint

Post new topicReply to topic
SOAP Reply and deferrable constraint View previous topic :: View next topic
Author Message
Algol
PostPosted: Thu Dec 28, 2017 5:27 am Post subject: SOAP Reply and deferrable constraint Reply with quote

Novice

Joined: 23 Jan 2017
Posts: 13

My flow uses SOAP Input, SOAP Reply and XA transaction (we take connections to Oracle databases through getJDBCType4Connection).
Unexpectedly it turned out that SOAP Reply sends answer before XA transaction is commited (and it's happened with big delay).
To check it I have made deferrable constraint that prevents keeping some values in table.
(I checked from sqlplus that I can change data, but cannot commit changes).
Than I call my SOAP method and receive successfull answer.
But in fact my changes were not commited - I see it in database.
So that is a big trouble.
I need a way to force commit before (or inside of) SOAP Reply node.
How can I do it?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 28, 2017 5:55 am Post subject: Re: SOAP Reply and deferrable constraint Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19630
Location: LI,NY

Algol wrote:
My flow uses SOAP Input, SOAP Reply and XA transaction (we take connections to Oracle databases through getJDBCType4Connection).
Unexpectedly it turned out that SOAP Reply sends answer before XA transaction is commited (and it's happened with big delay).
To check it I have made deferrable constraint that prevents keeping some values in table.
(I checked from sqlplus that I can change data, but cannot commit changes).
Than I call my SOAP method and receive successfull answer.
But in fact my changes were not commited - I see it in database.
So that is a big trouble.
I need a way to force commit before (or inside of) SOAP Reply node.
How can I do it?


I believe this is by design. The question here really is: Is the SOAP Reply node the last node in the flow? If this is the case the flow should commit the transaction once it returns from the SOAP Reply node.

This is somewhat tricky as you may need to force the commit if you want it to happen before the SOAP Reply. Remember that http/https is not inherently a transacted protocol.

If you want to make sure all gets committed at the same time, have you tried SOAP over JMS?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Algol
PostPosted: Sun Dec 31, 2017 7:41 am Post subject: Happy New Year! Reply with quote

Novice

Joined: 23 Jan 2017
Posts: 13

Thank you! And you're right - SOAP Reply is not the latest. Right after that we have one more Java Compute that raises MbUserException in case of Fault/faultCode != 0. I don't know other way to inform caller about fault and force rollback of all changes.
Do you know other way? I heard something about MQCMT, but what does it mean from Java code point of view?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 01, 2018 4:18 pm Post subject: Re: Happy New Year! Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19630
Location: LI,NY

Algol wrote:
Thank you! And you're right - SOAP Reply is not the latest. Right after that we have one more Java Compute that raises MbUserException in case of Fault/faultCode != 0. I don't know other way to inform caller about fault and force rollback of all changes.
Do you know other way? I heard something about MQCMT, but what does it mean from Java code point of view?

You probably should not wire that and let the exception propagate back until the input node... You can then wire the Fault terminal on the input node to a SOAP reply with a fault...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Algol
PostPosted: Tue Jan 02, 2018 4:35 am Post subject: Reply with quote

Novice

Joined: 23 Jan 2017
Posts: 13

http://www.mediafire.com/file/v10d1441e18k7sb/IS.gif
I tried to reorder CheckResponseForFault and SOAP Reply expecting that fail of COMMIT will be processed by Failure terminal of SOAP Input and than will come to SOAP Reply through IntegrationServiceInputFailureHandler subflow, that generates correct Fault response.
But it was not happened - I still receive OK answer while database has not my changes and I see that IntegrationServiceInputFailureHandler was not used in the flaw.
I need help! And think, that I need commit (MQCMT) before SOAP Reply. But how to do it?
Back to top
View user's profile Send private message
Armageddon123
PostPosted: Mon Jan 22, 2018 11:42 am Post subject: Reply with quote

Acolyte

Joined: 11 Feb 2014
Posts: 60

splitting the logic into multiple flows since soapreply node can be in a different flow from soapinput. So you can do SoapReply in later flows after the other flows are completed/committed.
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 SupportSOAP Reply and deferrable constraint
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.