Author |
Message
|
Algol |
Posted: Thu Dec 28, 2017 5:27 am Post subject: SOAP Reply and deferrable constraint |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Dec 28, 2017 5:55 am Post subject: Re: SOAP Reply and deferrable constraint |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
Algol |
Posted: Sun Dec 31, 2017 7:41 am Post subject: Happy New Year! |
|
|
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 |
|
 |
fjb_saper |
Posted: Mon Jan 01, 2018 4:18 pm Post subject: Re: Happy New Year! |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
Algol |
Posted: Tue Jan 02, 2018 4:35 am Post subject: |
|
|
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 |
|
 |
Armageddon123 |
Posted: Mon Jan 22, 2018 11:42 am Post subject: |
|
|
Acolyte
Joined: 11 Feb 2014 Posts: 61
|
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 |
|
 |
|